/* ============================================================
 * 声刻 SonicMint · 设计系统（参考 tapeout.link 视觉语言）
 * ============================================================ */

:root {
  --bg: #f4f3fa;
  --bg-gradient: radial-gradient(1200px 600px at 10% -10%, rgba(91,75,224,.10), transparent 60%),
                 radial-gradient(1000px 500px at 110% 0%, rgba(91,75,224,.07), transparent 55%),
                 #f4f3fa;
  --card: #ffffff;
  --text: #15132c;
  --text-2: #47446a;
  --muted: #6f6c8f;
  --border: #e8e6f2;
  --primary: #5b4be0;
  --primary-soft: rgba(91,75,224,.10);
  --primary-grad: linear-gradient(135deg, #5b4be0, #7c5cff);
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --r-lg: 20px;
  --r-md: 13px;
  --r-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(21,19,44,.04), 0 2px 6px rgba(21,19,44,.04);
  --shadow-md: 0 4px 14px rgba(21,19,44,.06), 0 8px 30px rgba(21,19,44,.05);
  --shadow-lg: 0 10px 30px rgba(21,19,44,.08), 0 20px 60px rgba(21,19,44,.06);
  --nav-h: 48px; /* 顶栏高度：body 内边距与移动菜单定位共用 */
}

/* ───────── 深色模式 ───────── */
html.dark {
  --bg: #12101f;
  --bg-gradient: radial-gradient(1200px 600px at 10% -10%, rgba(139,124,246,.16), transparent 60%),
                 radial-gradient(1000px 500px at 110% 0%, rgba(139,124,246,.10), transparent 55%),
                 #12101f;
  --card: #1b1830;
  --text: #ecebf6;
  --text-2: #b9b6d4;
  --muted: #908dae;
  --border: #2b2847;
  --primary: #8b7cf6;
  --primary-soft: rgba(139,124,246,.14);
  --accent: #fbbf24;
  --danger: #f87171;
  --success: #34d399;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.25);
  --shadow-md: 0 4px 14px rgba(0,0,0,.35), 0 8px 30px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.4), 0 20px 60px rgba(0,0,0,.35);
}
html.dark .nav { background: rgba(18,16,31,.78); }
html.dark .nav__menu { background: rgba(24,21,42,.95); }
html.dark .player__cover-fallback { background: var(--card); border: 1px solid var(--border); }
html.dark .vinyl__disc { box-shadow: 0 10px 40px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.05); }

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 横向溢出用 clip 收敛：hidden 会把 body 变成滚动容器，导致 position: sticky 失效 */
html { overflow-x: clip; }

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--nav-h); /* 顶栏脱离文档流，内容下移避让 */
  -webkit-tap-highlight-color: transparent;
}

button, a, .btn, .track { touch-action: manipulation; }

a { color: var(--primary); text-decoration: none; }

/* 键盘可达性 */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ───────── 导航栏 ───────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.nav__brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav__brand-link { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 0; }
.nav__logo {
  font-size: 17px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-grad);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(91,75,224,.3);
}
.nav__title { font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 顶栏内元素统一收窄，压缩栏高 */
.nav__right .btn, .nav__connect { padding: 7px 14px; font-size: 13px; }
.nav > .icon-btn { width: 34px; height: 34px; font-size: 15px; }

/* 汉堡按钮（默认桌面隐藏，移动端显示） */
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.nav__toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .25s ease;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端菜单（默认隐藏） */
.nav__menu {
  display: none;
  position: fixed; top: calc(var(--nav-h) + 6px); right: 12px; left: 12px; z-index: 200;
  flex-direction: column; gap: 4px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
}
.nav__menu.is-open { display: flex; }
.nav__menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 14px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600; color: var(--text);
  transition: background .15s;
}
.nav__menu-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.nav__menu-cta { width: 100%; justify-content: center; margin-top: 6px; padding: 13px; font-size: 15px; }
.nav__menu-badge { align-self: center; margin-top: 8px; }
.nav__menu-net { flex-direction: column; align-items: flex-start; gap: 10px; }

.badge {
  font-size: 12px; padding: 5px 10px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-2);
}
.badge--ok { color: var(--success); border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.08); }

/* ───────── 网络切换器 ───────── */
.net-switch { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.btn--net {
  padding: 4px 10px !important; font-size: 12px !important; font-weight: 600;
  border: none; border-radius: 0 !important; min-height: 32px !important;
  background: var(--card); color: var(--text-2);
}
.btn--net.is-active { background: var(--primary-grad); color: #fff; }

/* ───────── 按钮 ───────── */
.btn {
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s ease; white-space: nowrap;
}
.btn--primary {
  background: var(--primary-grad); color: #fff;
  box-shadow: 0 4px 12px rgba(91,75,224,.3);
}
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost {
  background: var(--card); color: var(--text-2); border-color: var(--border);
}
.btn--ghost:disabled { opacity: .5; cursor: not-allowed; }
.small-btn { padding: 5px 12px; font-size: 12px; margin-top: 6px; }

/* ───────── 容器 ───────── */
.container {
  max-width: 1180px; margin: 0 auto;
  padding: 28px 24px 60px;
}
.container--narrow { max-width: 760px; }
.mt-24 { margin-top: 24px; }

/* ───────── 卡片 ───────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.card h2 { font-size: clamp(18px, 3.6vw, 20px); font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.subhead { font-size: 15px; font-weight: 700; margin: 18px 0 10px; }
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card__head-right { display: flex; align-items: center; gap: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ───────── 表单 ───────── */
.form { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }
.form__row { display: flex; flex-direction: column; gap: 6px; }
.form__row label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form__row--2 { flex-direction: row; gap: 14px; }
.form__row--2 > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.form__row input[type="text"],
.form__row input[type="number"],
.form__row input[type="file"] {
  padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color .15s;
}
.form__row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form__row input[type="file"] { cursor: pointer; }
.form__actions { display: flex; align-items: center; gap: 12px; padding-top: 4px; }

.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-2); font-weight: 500;
  cursor: pointer; user-select: none;
}
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer;
}

/* 版税分配 */
.royalty-list { display: flex; flex-direction: column; gap: 8px; }
.royalty-item { display: flex; gap: 8px; align-items: center; }
.royalty-item input { flex: 1; padding: 9px 11px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-size: 13px; font-family: inherit; }
.royalty-item input[type="number"] { max-width: 110px; }
.royalty-item button { padding: 8px 12px; background: transparent; border: 1px solid var(--border); color: var(--danger); border-radius: var(--r-sm); cursor: pointer; font-size: 12px; transition: all .15s; }

/* ───────── 曲目列表 ───────── */
.tracks { display: flex; flex-direction: column; gap: 10px; }

/* 曲库工具栏：搜索 + 全部/我的切换 */
.library-toolbar { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.search-input {
  flex: 1; min-width: 0;
  padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg);
  font-size: 14px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.seg { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.btn--seg { border: none; background: transparent; padding: 7px 12px; font-size: 13px; border-radius: calc(var(--r-sm) - 2px); color: var(--text-2); }
.btn--seg.is-active { background: var(--card); color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* 最近播放 */
.recent { margin-top: 8px; }
.recent__head { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .05em; margin: 14px 0 8px; }

/* 创作者面板（版税仪表盘） */
.creator__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.creator__stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 16px 12px; text-align: center; }
.creator__num { font-size: 22px; font-weight: 700; color: var(--text); }
.creator__label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.creator__detail { margin-top: 14px; }
.creator__row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--border); margin-top: 8px; font-size: 13px;
}
.creator__row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator__row .m { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* 播放器控件：上/下一曲 */
.player__controls { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card);
  font-size: 16px; cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; flex: 0 0 auto;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { display: block; }
.lang-btn { font-size: 13px; font-weight: 700; }
#audio { flex: 1; min-width: 0; }

/* 空状态引导 */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 36px 20px; text-align: center;
}
.empty-state__icon {
  width: 72px; height: 72px; border-radius: 24px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: inset 0 0 0 1px rgba(91,75,224,.12);
}
.empty-state p { color: var(--text-2); font-size: 14px; }
.track {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; transition: all .15s;
}
.track.is-playing {
  border-color: var(--primary);
  background: linear-gradient(90deg, var(--primary-soft), transparent 65%);
  box-shadow: var(--shadow-sm);
}
.track.is-playing .track__title { color: var(--primary); }
.track.is-playing .track__icon { background: var(--primary-soft); }
.track__icon { font-size: 24px; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--bg); }
.track__cover { width: 52px; height: 52px; border-radius: var(--r-sm); object-fit: cover; }
.track__body { flex: 1; min-width: 0; }
.track__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__meta { font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.track__plays { color: var(--primary); font-weight: 500; }
.track__pending { color: var(--accent); }
.track__actions { display: flex; gap: 6px; }

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 5px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 11px; font-weight: 600; margin-left: 4px;
}
.tag--free { background: rgba(16,185,129,.12); color: var(--success); }

/* 处理器信息 */
#processorInfo code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; background: var(--bg); padding: 2px 6px; border-radius: 4px;
}

/* ───────── 播放器 ───────── */
.player { position: sticky; bottom: 16px; display: flex; gap: 20px; align-items: flex-start; box-shadow: var(--shadow-lg); z-index: 50; }
.player__cover-wrap { flex-shrink: 0; }
.player__cover { width: 84px; height: 84px; border-radius: var(--r-md); object-fit: cover; box-shadow: var(--shadow-sm); }
.player__cover-fallback { width: 84px; height: 84px; border-radius: var(--r-md); background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.player__main { flex: 1; min-width: 0; }
.player__info { margin-bottom: 8px; }
.player__title { font-weight: 700; font-size: 16px; }
#audio { width: 100%; margin: 10px 0; border-radius: 8px; }
.player__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ───────── Hero 黑胶唱片 ───────── */
.hero {
  display: flex; align-items: center; gap: 48px;
  padding: 30px 10px 40px;
}
.hero__vinyl { flex-shrink: 0; }
.hero__text h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 14px; }
.hero__accent { background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__text .muted { font-size: 15px; max-width: 420px; margin-bottom: 22px; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 黑胶唱片主体 */
.vinyl {
  position: relative; width: 280px; height: 280px;
}
.vinyl__disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #2a2a2a 0%, #0a0a0a 60%, #000 100%);
  box-shadow: 0 8px 30px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.04);
  animation: spin 12s linear infinite;
}
.vinyl__disc.is-playing { animation: spin 2.5s linear infinite; }
.vinyl__groove {
  position: absolute; inset: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.06);
}
.vinyl__groove--2 { inset: 55px; }
.vinyl__groove--3 { inset: 80px; }

/* 中心标签（封面图） */
.vinyl__label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--primary-grad);
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(0,0,0,.5), inset 0 0 12px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
}
.vinyl__label img { width: 100%; height: 100%; object-fit: cover; }
.vinyl__label-fallback { font-size: 36px; }
.vinyl__hole {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: #1a1a1a; box-shadow: 0 0 0 1px rgba(255,255,255,.15);
}

/* 唱臂 */
.vinyl__tonearm {
  position: absolute; top: -8px; right: -6px;
  transform-origin: 100% 0;
  transform: rotate(-25deg);
  transition: transform .5s ease;
}
.vinyl__disc.is-playing ~ .vinyl__tonearm { transform: rotate(-8deg); }
.tonearm__base {
  position: absolute; top: 0; right: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(145deg, #c8c8c8, #8a8a8a);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.tonearm__arm {
  position: absolute; top: 10px; right: 10px;
  width: 130px; height: 5px;
  background: linear-gradient(90deg, #8a8a8a, #c8c8c8);
  border-radius: 3px;
  transform-origin: right center;
  transform: rotate(-20deg);
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.tonearm__head {
  position: absolute; top: 42px; left: 0;
  width: 14px; height: 20px;
  background: linear-gradient(145deg, #d0d0d0, #909090);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── 规则页 ───────── */
.rules-hero { text-align: center; padding: 30px 0 10px; }
.rules-hero h1 { font-size: clamp(24px, 4.4vw, 30px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.rules-hero p { color: var(--text-2); font-size: 15px; max-width: 640px; margin: 0 auto; }
/* 左对齐变体（发行页页头） */
.rules-hero--left { text-align: left; padding: 20px 0 10px; }
.rules-hero--left p { max-width: none; margin: 0; }

.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.rule-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.rule-card__icon { font-size: 28px; margin-bottom: 10px; }
.rule-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.rule-card p { font-size: 13px; color: var(--text-2); line-height: 1.65; }

.rules-step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.rules-step:last-child { border-bottom: none; }
.rules-step__num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.rules-step__body p { font-size: 13px; color: var(--text-2); margin-top: 4px; }

.callout {
  background: var(--primary-soft); border: 1px solid rgba(91,75,224,.2);
  border-radius: var(--r-md); padding: 16px 18px; margin: 16px 0;
  font-size: 13px; color: var(--text-2);
}
.callout strong { color: var(--text); }

/* ───────── 页脚 ───────── */
.footer {
  text-align: center; padding: 30px 24px;
  color: var(--muted); font-size: 13px;
}
.footer a { color: var(--muted); }
.footer p + p { margin-top: 6px; }

/* 规则页：注意事项列表 / 底部 CTA */
.notes-list { font-size: 13px; color: var(--text-2); line-height: 2; padding-left: 20px; margin-top: 8px; }
.page-cta { text-align: center; margin: 30px 0; }

/* ───────── 提示条（替代 alert）───────── */
.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(70px + env(safe-area-inset-top, 0px));
  z-index: 300;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: min(92vw, 440px);
  pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 12px;
  background: rgba(21,19,44,.94); color: #fff;
  font-size: 13px; line-height: 1.5; text-align: center;
  white-space: pre-line; word-break: break-word;
  box-shadow: var(--shadow-lg);
  animation: toast-in .18s ease;
}
.toast--ok { background: rgba(5,150,105,.95); }
.toast--err { background: rgba(220,38,38,.95); }
.toast--out { opacity: 0; transition: opacity .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
html.dark .toast { background: rgba(236,235,246,.96); color: #15132c; }
html.dark .toast--ok { background: rgba(16,185,129,.96); color: #fff; }
html.dark .toast--err { background: rgba(239,68,68,.96); color: #fff; }

/* ───────── 加载骨架屏 ───────── */
.skeleton {
  height: 82px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 37%, var(--bg) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ───────── 规格表 ───────── */
.table-wrap { overflow-x: auto; margin-top: 8px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th, .spec-table td { padding: 11px 10px; text-align: left; }
.spec-table th { color: var(--text-2); font-weight: 600; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }

/* 三列规则卡（手机自动堆叠，见响应式） */
.rules-grid--3 { grid-template-columns: repeat(3, 1fr); }
.rule-card--tight { padding: 16px; }

/* ───────── 鼠标悬停效果（触屏不生效，避免 tap 后样式粘滞）───────── */
@media (hover: hover) {
  a:hover { text-decoration: underline; }
  .nav__brand-link:hover { text-decoration: none; }
  .nav__toggle:hover { background: var(--primary-soft); }
  a.nav__menu-item:hover { background: var(--primary-soft); text-decoration: none; color: var(--primary); }
  .btn--net:hover { background: var(--primary-soft); color: var(--primary); }
  .btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(91,75,224,.4); }
  .btn--ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
  .icon-btn:hover { border-color: var(--primary); color: var(--primary); }
  .royalty-item button:hover { background: rgba(239,68,68,.08); border-color: var(--danger); }
  .track:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
}

/* ───────── 响应式 ───────── */

/* 导航提前收窄：≤900px 顶栏项过多，中英切换时会被挤压 */
@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .nav { padding: 8px 14px; gap: 8px; }
  .nav__logo { width: 32px; height: 32px; font-size: 18px; border-radius: 8px; }
  .nav__right { display: none; }   /* 桌面导航收进汉堡菜单 */
  .nav__toggle { display: flex; }
  .nav > .icon-btn { width: 44px; height: 44px; font-size: 15px; } /* 触控区 ≥44px */
  .nav__menu-item { min-height: 48px; }
  .nav__menu-net .btn--net { min-height: 44px !important; }
  .nav__connect { padding: 9px 12px; font-size: 13px; flex: 0 0 auto; } /* 钱包按钮常驻顶栏 */
}

/* 平板及以下 */
@media (max-width: 768px) {
  .container { padding: 20px 16px 50px; }
  .card { padding: 20px; }
  .hero { gap: 32px; padding: 24px 8px 32px; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .rules-grid--3 { grid-template-columns: 1fr; }
}

/* 手机 */
@media (max-width: 520px) {
  .container { padding: 14px 16px 44px; }
  .card { padding: 18px; border-radius: 18px; margin-bottom: 16px; }
  .card__head { flex-wrap: wrap; gap: 8px; }

  /* ── 表单：触摸区域 ≥44px ── */
  .form { gap: 14px; }
  .form__row input[type="text"],
  .form__row input[type="number"],
  .form__row input[type="file"] {
    padding: 12px 14px; font-size: 16px; min-height: 46px; /* 16px 防止 iOS 聚焦缩放 */
  }
  .form__row label { font-size: 12px; }
  .form__row--2 { flex-direction: column; gap: 14px; }
  .form__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .form__actions .btn { width: 100%; padding: 12px; font-size: 15px; }
  .checkbox-row { font-size: 12px; line-height: 1.5; }
  .checkbox-row input[type="checkbox"] { width: 20px; height: 20px; }

  /* ── 版税分配：换行堆叠 ── */
  .royalty-item { flex-wrap: wrap; gap: 6px; }
  .royalty-item input { flex: 1 1 100%; }
  .royalty-item input[type="number"] { max-width: none; flex: 0 0 40%; }
  .royalty-item button { padding: 10px 12px; font-size: 13px; flex: 0 0 auto; min-height: 44px; }

  /* ── 曲目卡片 ── */
  .track { padding: 12px 14px; gap: 10px; border-radius: 14px; }
  .track__icon, .track__cover { width: 44px; height: 44px; border-radius: 10px; }
  .track__icon { font-size: 20px; }
  .track__title { font-size: 14px; }
  .track__meta { font-size: 11px; gap: 10px; }
  .track__actions .btn { min-height: 38px; }

  /* ── 曲库工具栏：搜索 + 切换 ── */
  .library-toolbar { flex-wrap: wrap; }
  .search-input { min-height: 44px; flex: 1 1 100%; font-size: 16px; }
  .seg { width: 100%; }
  .btn--seg { flex: 1; min-height: 38px; }

  /* ── 创作者面板 ── */
  .creator__grid { gap: 8px; }
  .creator__num { font-size: 18px; }
  .creator__row { font-size: 12px; padding: 9px 10px; }

  /* ── 播放器控件 ── */
  .player__controls { gap: 8px; }
  .icon-btn { width: 44px; height: 44px; font-size: 15px; }

  /* ── Hero：唱片居中 + 光晕 ── */
  .hero { flex-direction: column; gap: 24px; text-align: center; padding: 10px 0 28px; }
  .hero__text .muted { font-size: 14px; max-width: 320px; margin-left: auto; margin-right: auto; }
  .hero__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; margin: 0 auto; gap: 10px; }
  .hero__actions .btn { width: 100%; text-align: center; }
  .vinyl { width: 210px; height: 210px; }
  .vinyl__disc { box-shadow: 0 12px 44px rgba(91,75,224,.35), inset 0 0 0 2px rgba(255,255,255,.04); }
  .vinyl__label { width: 80px; height: 80px; }
  .vinyl__label-fallback { font-size: 28px; }
  .vinyl__groove { inset: 22px; }
  .vinyl__groove--2 { inset: 42px; }
  .vinyl__groove--3 { inset: 62px; }
  .tonearm__arm { width: 95px; }
  .tonearm__head { top: 32px; }

  /* ── 播放器：底部常驻迷你条 ── */
  .player {
    position: fixed; left: 8px; right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    margin: 0;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    box-shadow: 0 12px 40px rgba(21,19,44,.14), 0 2px 8px rgba(21,19,44,.06);
  }
  /* 播放器脱离文档流后，为页面留出底部空间 */
  body.has-player { padding-bottom: calc(186px + env(safe-area-inset-bottom, 0px)); }
  .player__cover, .player__cover-fallback {
    width: 52px; height: 52px; border-radius: 12px; font-size: 22px;
  }
  html.dark .player { background: rgba(24,21,42,.92); border-color: #2b2847; }
  .player__main { flex: 1; min-width: 0; }
  .player__title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player__artist { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #playerStats { display: none; }  /* 迷你条收纳长文案 */
  .player__controls { margin: 4px 0; }
  #audio { margin: 4px 0; height: 34px; width: 100%; }
  .player__actions { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  .player__actions .btn { min-height: 38px; padding: 8px 14px; font-size: 13px; flex: 1; }

  /* ── 规则页 ── */
  .rules-hero { padding: 20px 0 8px; }
  .rules-hero p { font-size: 13px; }
  .rules-grid { grid-template-columns: 1fr; }
  .rule-card { padding: 18px; }
  .rules-step { gap: 10px; }
  .callout { padding: 12px 14px; font-size: 12px; }

  /* ── 页脚 ── */
  .footer { padding: 20px 14px; font-size: 12px; }
}

/* 窄屏：空间不足时才隐藏品牌名 */
@media (max-width: 400px) {
  .nav__title { display: none; }
}

/* 超小屏 */
@media (max-width: 360px) {
  .vinyl { width: 180px; height: 180px; }
  .vinyl__label { width: 70px; height: 70px; }
  .hero__text h1 { font-size: 22px; }
  .track__meta { gap: 8px; }
}
