/* 天籁之音 · 视觉系统：深色音乐应用为默认，跟随系统切换浅色 */
:root {
  --bg: #0d0b17;
  --bg-glow-1: rgba(139, 92, 246, .22);
  --bg-glow-2: rgba(236, 72, 153, .14);
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .07);
  --panel-solid: #16131f;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #f3f1fb;
  --ink-2: #c4bfd8;
  --muted: #8a84a3;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-ink: #c4b5fd;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #d946ef 55%, #ec4899 100%);
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, .12);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, .12);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, .12);
  --star: #fcd34d;
  --input: rgba(0, 0, 0, .28);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --radius: 18px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f4fb;
    --bg-glow-1: rgba(139, 92, 246, .14);
    --bg-glow-2: rgba(236, 72, 153, .09);
    --panel: rgba(255, 255, 255, .78);
    --panel-2: rgba(255, 255, 255, .95);
    --panel-solid: #ffffff;
    --line: rgba(30, 20, 60, .09);
    --line-2: rgba(30, 20, 60, .18);
    --ink: #1c1730;
    --ink-2: #463f5e;
    --muted: #7a7391;
    --accent-ink: #6d28d9;
    --ok: #059669;
    --warn: #b45309;
    --bad: #dc2626;
    --star: #d97706;
    --input: rgba(255, 255, 255, .9);
    --shadow: 0 18px 40px -22px rgba(60, 30, 120, .35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 15px/1.65 var(--sans); color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -8%, var(--bg-glow-1), transparent 60%),
    radial-gradient(800px 600px at 105% 20%, var(--bg-glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  padding-bottom: 110px;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: .01em; }
em { font-style: normal; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
button { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, .35); }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - 1200px) / 2));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand small { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .08em; }
.logo {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 18px; box-shadow: 0 6px 18px -6px rgba(217, 70, 239, .7);
}
.logo.big { width: 58px; height: 58px; font-size: 30px; border-radius: 18px; margin: 0 auto 14px; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a {
  position: relative; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-size: 14px;
}
.tabs a:hover { background: var(--panel-2); text-decoration: none; }
.tabs a.on { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.status-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; }
.status-dot.ok { background: var(--ok); }
.status-dot.warn { background: var(--warn); }
body.locked .tabs { display: none; }

main { max-width: 1200px; margin: 0 auto; padding: 22px 16px 40px; }

/* ---------------------------------------------------------------- 通用 */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card + .card { margin-top: 18px; }
.card-title { display: flex; align-items: baseline; gap: 10px; font-weight: 650; font-size: 15px; margin-bottom: 14px; }
.card-title em, .sec-title em, .field > span em, .page-head h2 em { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.card-title .tools { margin-left: auto; display: flex; gap: 6px; }
.sec-title { font-weight: 650; margin: 26px 0 12px; display: flex; gap: 10px; align-items: baseline; }
.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 34px 16px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--ink); cursor: pointer; font-size: 14px; white-space: nowrap;
  transition: transform .12s ease, background .15s, border-color .15s, opacity .15s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 10px 24px -12px rgba(217, 70, 239, .8); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.big { padding: 12px 26px; font-size: 16px; border-radius: 14px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btns.col { flex-direction: column; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 10px; border-radius: 999px;
  background: rgba(139, 92, 246, .16); color: var(--accent-ink); white-space: nowrap; font-weight: 500;
}
.badge.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.star { background: rgba(252, 211, 77, .14); color: var(--star); }
.star { color: var(--star); font-style: normal; margin-right: 2px; }

.alert { padding: 12px 16px; border-radius: 14px; background: var(--warn-bg); color: var(--warn); margin: 14px 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field > span { font-size: 13px; color: var(--ink-2); font-weight: 550; display: flex; gap: 8px; align-items: baseline; }
input:not([type="checkbox"]):not([type="range"]):not([type="file"]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--input);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.75; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row2 > .field { margin-bottom: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--ink-2); font-size: 13px; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--input); border: 1px solid var(--line-2); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.seg button.on { background: var(--panel-2); color: var(--ink); box-shadow: 0 1px 0 var(--line-2), 0 0 0 1px var(--line-2); }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); margin: 10px 0; user-select: none; }
.switch.sm { font-size: 13px; margin: 0; }
.switch input { display: none; }
.switch i { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:disabled + i { opacity: .4; }
.switch em { color: var(--muted); font-size: 12px; }
.mini-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.bpm { display: flex; gap: 12px; align-items: center; min-height: 42px; }

/* ---------------------------------------------------------------- 创作页 */
.hero { text-align: center; padding: 26px 0 8px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; letter-spacing: .02em; }
.hero p { color: var(--ink-2); margin: 10px auto 0; max-width: 620px; }
.hero.small h1 { font-size: clamp(24px, 3.6vw, 34px); }

.preset-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.preset {
  text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 3px;
}
.preset b { font-size: 14px; }
.preset span { font-size: 12px; color: var(--muted); }
.preset:hover { border-color: var(--accent); transform: translateY(-1px); }
.preset.on { border-color: transparent; background: linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box, var(--grad) border-box; border: 1px solid transparent; }

.create-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; margin-top: 22px; align-items: start; }
.create-grid .card + .card { margin-top: 0; }
.anchors { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode {
  text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: all .15s;
}
.mode b { font-size: 15px; }
.mode em { font-size: 12px; color: var(--accent-ink); }
.mode span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.mode:hover { border-color: var(--accent); }
.mode.on { background: rgba(139, 92, 246, .14); border-color: var(--accent); }

details.adv { border-top: 1px dashed var(--line-2); padding-top: 10px; margin-top: 4px; }
details summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; padding: 4px 0; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸"; display: inline-block; margin-right: 6px; transition: transform .15s; color: var(--muted); }
details[open] > summary::before { transform: rotate(90deg); }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 10px; }

.style-preview { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--input); border: 1px dashed var(--line-2); }
.style-preview span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; letter-spacing: .05em; }
.style-preview code { font: 12.5px/1.6 var(--mono); color: var(--ink-2); word-break: break-word; }
.go { display: flex; gap: 12px; align-items: flex-end; justify-content: flex-end; margin-top: 16px; }
.go.two { justify-content: space-between; }
.go .copies { margin: 0; width: 84px; }
.go .btn.big { flex: 1; max-width: 320px; }

.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.job-card {
  display: block; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); transition: border-color .15s, transform .15s;
}
.job-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.job-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.job-top b { flex: 1 1 100%; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.job-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-card.error .bar i { background: var(--bad); }
.bar { height: 5px; border-radius: 999px; background: var(--line); margin: 12px 0 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .6s ease; }
.job-card.running .bar i { background-size: 200% 100%; animation: flow 2.2s linear infinite; background-image: linear-gradient(90deg, #8b5cf6, #ec4899, #8b5cf6); }
@keyframes flow { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- 进度页 */
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.job-head { display: flex; gap: 18px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.job-head h2 { font-size: 22px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.brief { color: var(--ink-2); font-family: var(--serif); margin: 8px 0 0; font-size: 15px; }
.job-stats { display: flex; gap: 10px; }
.job-stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; text-align: center; min-width: 78px; }
.job-stats b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.job-stats span { font-size: 11.5px; color: var(--muted); }

.stages { display: flex; gap: 0; list-style: none; padding: 0; margin: 22px 0 10px; overflow-x: auto; scrollbar-width: none; }
.stages li { flex: 1; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--muted); text-align: center; }
.stages li::before { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 2px; background: var(--line-2); z-index: 0; }
.stages li:first-child::before { display: none; }
.stages li b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-solid); border: 2px solid var(--line-2); z-index: 1; font-size: 12px; }
.stages li.st-done { color: var(--ink-2); }
.stages li.st-done b { background: var(--grad); border-color: transparent; color: #fff; }
.stages li.st-done::before, .stages li.st-active::before { background: var(--accent); }
.stages li.st-active { color: var(--ink); font-weight: 600; }
.stages li.st-active b { border-color: var(--accent); color: var(--accent-ink); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(139, 92, 246, .18); } }

.running { margin: 8px 0 4px; }
.loading-line { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; padding: 8px 0; }
.loading-line i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.trace { margin-top: 16px; display: grid; gap: 12px; }
.tg { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.tg-title { font-size: 12px; letter-spacing: .08em; color: var(--accent-ink); font-weight: 650; margin-bottom: 6px; }
.ti, .tg summary { font-size: 13.5px; color: var(--ink-2); padding: 3px 0; }
.tg details pre, .errs pre { background: var(--input); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 13.5px/1.8 var(--serif); color: var(--ink); margin: 6px 0 10px; max-height: 460px; overflow: auto; }
.errs { margin-top: 14px; }
.errs pre { font: 12px/1.6 var(--mono); color: var(--muted); }
.done-card { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; margin-top: 18px; }
.done-card h3 { font-size: 24px; margin: 8px 0 6px; font-family: var(--serif); }
.lyric { font: 15.5px/1.95 var(--serif); color: var(--ink); }
.lyric.small { font-size: 14px; max-height: 340px; overflow: auto; padding: 14px 16px; background: var(--input); border-radius: 14px; border: 1px solid var(--line); }
.danger-zone { margin-top: 30px; text-align: right; }

/* ---------------------------------------------------------------- 工作室 */
.studio-head { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.studio-meta { flex: 1; min-width: 0; }
.title-input {
  font: 700 clamp(22px, 3.2vw, 32px)/1.3 var(--serif) !important; background: transparent !important;
  border: 1px solid transparent !important; padding: 2px 6px !important; margin-left: -7px; color: var(--ink);
}
.title-input:hover { border-color: var(--line-2) !important; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.cover { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; flex: none; color: rgba(255, 255, 255, .92); font: 700 18px var(--serif); box-shadow: var(--shadow); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.lg { width: 132px; height: 132px; border-radius: 22px; font-size: 34px; }
.studio-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.studio-grid .card + .card { margin-top: 0; }
#w-tasks-card { margin-top: 18px; }
.lyric-edit { font: 15.5px/1.95 var(--serif) !important; min-height: 520px; }
.metrics { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.metric { display: inline-flex; gap: 6px; align-items: baseline; padding: 4px 10px; border-radius: 10px; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--input); border: 1px solid var(--line); cursor: help; }
.metric em { font-size: 11.5px; color: var(--muted); }
.metric.good { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.metric.meh { color: var(--warn); }
.poly { margin-top: 10px; }
.poly summary em { color: var(--muted); font-size: 12px; margin-left: 6px; }
.poly-ch { display: inline-block; margin: 4px 6px 0 0; padding: 2px 9px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font: 600 15px var(--serif); cursor: help; }
.poly-ch sub { font: 10px var(--sans); opacity: .8; margin-left: 2px; }
.notes { background: rgba(139, 92, 246, .1); border-radius: 12px; padding: 9px 12px; font-size: 13.5px; color: var(--ink-2); margin: -4px 0 14px; }
#w-style { font: 13px/1.65 var(--mono); }

.task { padding: 14px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; padding-top: 0; }
.task-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.track { display: flex; gap: 14px; padding: 12px; border-radius: 16px; background: var(--input); border: 1px solid var(--line); margin-bottom: 10px; }
.track-cover { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; flex: none; }
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; inset: auto 8px 8px auto; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: #1c1730; cursor: pointer; font-size: 13px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35); display: grid; place-items: center; padding-left: 2px; transition: transform .15s;
}
.play:hover { transform: scale(1.08); }
.track-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.track-title { font-weight: 600; }
.track audio { width: 100%; height: 36px; }
.track-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tags { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------------------------------------------------------------- 曲库 */
.page-head { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-size: 24px; display: flex; gap: 10px; align-items: baseline; }
.page-head .tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { width: 240px !important; border-radius: 999px !important; padding: 8px 16px !important; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.work-card {
  position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); transition: transform .15s, border-color .15s;
}
.work-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.work-card .cover { width: 100%; height: 150px; border-radius: 0; font-size: 40px; box-shadow: none; }
.work-card .play { top: 112px; right: 12px; bottom: auto; }
.wc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.wc-body b { font: 650 16px var(--serif); }
.wc-body p { margin: 4px 0 0; font: 13.5px/1.6 var(--serif); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-tags { display: flex; gap: 6px; margin-top: 6px; min-height: 20px; }
.lib-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------------------------------------------------------------- 灵感库 */
.insp { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.combo-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; }
.combo-list a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 12px; color: var(--ink-2); font-size: 13.5px; }
.combo-list a span { color: var(--muted); font-size: 12px; }
.combo-list a:hover { background: var(--panel-2); text-decoration: none; }
.combo-list a.on { background: var(--panel-2); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.song-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.song {
  text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
  cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 4px;
}
.song:hover { border-color: var(--accent); transform: translateY(-1px); }
.song > div { display: flex; justify-content: space-between; gap: 8px; }
.song b { font: 600 15px var(--serif); }
.song p { margin: 0; font: 13px/1.6 var(--serif); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(8, 6, 16, .62); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 22px; padding: 22px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.modal-x { position: absolute; top: 14px; right: 14px; border: 0; background: var(--panel-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.modal-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding-right: 40px; }
.modal-head h3 { font: 700 22px var(--serif); }
.modal-body { display: grid; grid-template-columns: 1fr 280px; gap: 22px; }
.golden, .notes-box { padding: 12px 14px; border-radius: 14px; background: var(--input); border: 1px solid var(--line); font: 14px/1.75 var(--serif); margin-bottom: 12px; }
.golden { border-color: rgba(252, 211, 77, .35); }
.golden em, .notes-box em { display: block; font: 600 11.5px var(--sans); color: var(--star); letter-spacing: .08em; margin-bottom: 4px; }
.notes-box em { color: var(--accent-ink); }
.notes-box { font-size: 13px; color: var(--ink-2); max-height: 260px; overflow: auto; }

/* ---------------------------------------------------------------- 设置 / 登录 */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.settings-grid .card + .card { margin-top: 0; }
.kv { display: grid; grid-template-columns: 76px 1fr; gap: 10px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tips { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; display: grid; gap: 8px; }
.login { min-height: 70vh; display: grid; place-items: center; }
.login-card { width: min(380px, 100%); text-align: center; padding: 34px 28px; }
.login-card h2 { font-size: 24px; margin-bottom: 6px; }
.login-card form { display: grid; gap: 12px; margin-top: 18px; }

/* ---------------------------------------------------------------- 播放器与提示 */
.player {
  position: fixed; left: 50%; bottom: 14px; transform: translate(-50%, 140%); z-index: 40;
  width: min(760px, calc(100% - 24px)); display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 20px; background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
  border: 1px solid var(--line-2); backdrop-filter: blur(16px); box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), visibility 0s .3s;
  visibility: hidden;
}
.player.show { transform: translate(-50%, 0); visibility: visible; transition: transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.pl-cover { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: var(--grad); display: grid; place-items: center; color: #fff; flex: none; }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-meta { min-width: 0; flex: 0 1 180px; display: flex; flex-direction: column; }
.pl-meta b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player audio { flex: 1; min-width: 0; height: 38px; }
.pl-close { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; }

.toasts { position: fixed; top: 74px; right: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  max-width: min(420px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 14px; font-size: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-6px); transition: all .25s;
}
.toast.show { opacity: 1; transform: none; }
.toast.ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.toast.bad { border-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--bad); }

/* ---------------------------------------------------------------- 企业定制 */
[hidden] { display: none !important; }
.eyebrow { display: inline-block; font-size: 12.5px; letter-spacing: .14em; color: var(--accent-ink); font-weight: 650; padding: 4px 12px; border-radius: 999px; background: rgba(139, 92, 246, .14); margin-bottom: 12px; }
.corp-hero p { max-width: 720px; }
.flow { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 18px 0 0; counter-reset: f; }
.flow li { counter-increment: f; font-size: 13px; color: var(--ink-2); padding: 5px 12px 5px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.flow li::before { content: counter(f); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11px; margin-right: 6px; }
.corp-steps { max-width: 1040px; margin: 24px auto 0; display: grid; gap: 18px; }
.corp-steps .card + .card { margin-top: 0; }
.card-title .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--grad); color: #fff; font-size: 13px; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type { text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: all .15s; }
.type b { font: 700 17px var(--serif); }
.type em { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.type span { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.type i { font-style: normal; font-size: 11.5px; color: var(--accent-ink); margin-top: 4px; }
.type:hover { border-color: var(--accent); transform: translateY(-1px); }
.type.on { background: rgba(139, 92, 246, .14); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.row4 { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 14px; }
.sm-select { width: auto !important; padding: 5px 34px 5px 12px !important; font-size: 13px !important; border-radius: 10px !important; }
.industry-hint { font-size: 12.5px; color: var(--ink-2); margin: -6px 0 14px; line-height: 1.7; }
.industry-hint b { color: var(--accent-ink); font-weight: 600; }
.industry-hint b.bad { color: var(--bad); }
.stories { border: 1px dashed color-mix(in srgb, var(--star) 45%, transparent); border-radius: 16px; padding: 14px 14px 4px; margin-bottom: 16px; background: rgba(252, 211, 77, .04); }
.gold { color: var(--star); font-weight: 600; font-size: 12px; }
.ask { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -6px 0 12px; }
.qa { display: grid; gap: 0; padding: 12px; border-radius: 14px; background: var(--input); margin-bottom: 12px; }
.qa .field > span { color: var(--ink); font-weight: 500; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cstyle { text-align: left; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: all .15s; }
.cstyle b { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.cstyle b i { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--grad); color: #fff; }
.cstyle span { font-size: 12px; color: var(--muted); }
.cstyle:hover { border-color: var(--accent); }
.cstyle.on { background: rgba(139, 92, 246, .14); border-color: var(--accent); }

/* 工作室扩展 */
#w-extra { margin-top: 18px; }
#w-extra > div { display: grid; gap: 18px; align-content: start; }
#w-extra .card + .card { margin-top: 0; }
.coverage { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.coverage > .muted { margin-right: 4px; }
.extras { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.extras > .muted { font-size: 12px; margin-right: 2px; }
.extras .chip { font-size: 12px; padding: 3px 10px; text-decoration: none; }
.chip.wait { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.chip.wait i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.chip.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad); }
.review-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.issues { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.issues li { font-size: 13.5px; padding: 8px 12px; border-radius: 12px; background: var(--input); border-left: 3px solid var(--line-2); line-height: 1.6; }
.issues li b { font-size: 11.5px; margin-right: 6px; color: var(--muted); font-weight: 600; }
.issues li span { color: var(--ink-2); }
.issues li.sev4, .issues li.sev5 { border-left-color: var(--bad); }
.issues li.sev3 { border-left-color: var(--warn); }
.notes-doc { font-size: 14px; color: var(--ink-2); }
.notes-doc p { margin: 6px 0; }
.notes-doc b { color: var(--ink); }
.concept { font: 600 16px/1.7 var(--serif); color: var(--ink) !important; }
.vmap { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.vmap th, .vmap td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.vmap th { color: var(--muted); font-weight: 500; font-size: 12px; }
.vmap td:nth-child(2) { font-family: var(--serif); color: var(--ink); }
blockquote { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: rgba(139, 92, 246, .08); border-radius: 0 12px 12px 0; font-family: var(--serif); color: var(--ink); }
.alt-list, .ver-list { display: grid; gap: 8px; }
.ver-list { margin-top: 14px; }
details.alt { background: var(--input); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
details.alt summary em { color: var(--muted); font-size: 12px; margin-left: 6px; }
details.alt .lyric.small { margin: 8px 0; max-height: 280px; }

/* 客户项目 */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.proj { display: flex; gap: 14px; padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); transition: all .15s; }
.proj:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.proj > div:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.proj b { font-size: 15.5px; }
.proj-logo { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font: 700 17px var(--serif); }
.proj-logo.lg { width: 72px; height: 72px; font-size: 24px; border-radius: 20px; }
.proj-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 6px 0 20px; }
.proj-head > div:nth-child(2) { flex: 1; min-width: 200px; }
.proj-head h2 { font: 700 24px var(--serif); }
.proj-head .btns { margin: 0; align-items: center; }
.kv.wide { grid-template-columns: 76px 1fr; font-size: 13.5px; }
.kv.wide dd { display: block; color: var(--ink-2); white-space: pre-wrap; }
.mini-work { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; color: var(--ink); }
.mini-work:hover { background: var(--panel-2); text-decoration: none; }
.mini-work .cover { width: 48px; height: 48px; font-size: 14px; border-radius: 12px; }
.mini-work div { display: flex; flex-direction: column; }
.combo-sep { font-size: 11.5px; letter-spacing: .12em; color: var(--muted); padding: 10px 12px 2px; }
.song .prof { font-size: 12px; }
.prof-line { margin: -6px 0 12px; }

/* 登录即首页 */
.login { min-height: 76vh; display: grid; grid-template-columns: 1.3fr 400px; gap: 40px; align-items: center; max-width: 1100px; margin: 0 auto; }
.landing h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; line-height: 1.25; margin-bottom: 14px; }
.landing p { color: var(--ink-2); font-size: 15.5px; line-height: 1.8; margin: 0 0 18px; }
.landing-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.landing-types span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 14px var(--serif); background: var(--panel); }
.landing-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; counter-reset: s; }
.landing-steps li { counter-increment: s; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.landing-steps li b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 2px; }
.landing-steps li b::before { content: "0" counter(s) " "; color: var(--accent-ink); font-family: var(--mono); font-size: 12px; }

/* 公开试听页 */
.share-page main { max-width: 720px; padding-top: 28px; }
.share-card { text-align: center; padding: 30px 26px; }
.share-cover { width: 150px; height: 150px; margin: 0 auto 18px; border-radius: 28px; overflow: hidden; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 54px; box-shadow: var(--shadow); }
.share-cover img { width: 100%; height: 100%; object-fit: cover; }
.share-card h1 { font: 800 30px var(--serif); margin: 6px 0 10px; }
.share-pitch { color: var(--ink-2); font-family: var(--serif); max-width: 520px; margin: 0 auto 18px; }
.share-track { display: flex; gap: 10px; align-items: center; margin: 10px 0; text-align: left; }
.share-track span { font-size: 12.5px; color: var(--muted); white-space: nowrap; width: 88px; }
.share-track audio { flex: 1; min-width: 0; }
.share-lyric { text-align: center; margin: 22px 0; font-size: 16px; }
.lyric .sec, .pd-lyric .sec { display: inline-block; font: 600 11px var(--sans); letter-spacing: .12em; color: var(--accent-ink); padding: 1px 8px; border-radius: 999px; background: rgba(139, 92, 246, .12); margin-top: 6px; }
.pd-lyric .sec { color: #6d28d9; background: #f3efff; }
.pd-kicker { font-size: 12.5px; letter-spacing: .1em; color: var(--accent-ink); }

/* 打印版 */
.print-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.print-doc { background: #fff; color: #1a1a1a; max-width: 800px; margin: 0 auto; padding: 48px 56px; border-radius: 6px; box-shadow: var(--shadow); --ink: #1a1a1a; --ink-2: #444; --muted: #777; --line: #e5e5e5; --input: #f6f6f6; --accent-ink: #6d28d9; }
.print-doc header { text-align: center; border-bottom: 1px solid #e5e5e5; padding-bottom: 18px; margin-bottom: 24px; }
.print-doc h1 { font: 800 30px var(--serif); margin: 8px 0; color: #111; }
.pd-meta { font-size: 12.5px; color: #777; }
.pd-lyric { font: 15px/2 var(--serif); columns: 2; column-gap: 40px; color: #111; }
.pd-notes { margin-top: 28px; border-top: 1px solid #e5e5e5; padding-top: 18px; }
.pd-notes h2 { font: 700 18px var(--serif); margin-bottom: 8px; }
.print-doc footer { margin-top: 30px; font-size: 11.5px; color: #999; text-align: center; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; padding: 0; }
  .topbar, .player, .toasts, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-doc { box-shadow: none; padding: 0; max-width: none; }
  .pd-notes, .vmap tr { break-inside: avoid; }
}

/* 精选 Demo 与最近作品 */
.landing-demos { max-width: 1100px; margin: 10px auto 0; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.demo-card { display: flex; gap: 14px; padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.demo-cover { position: relative; width: 112px; height: 112px; flex: none; border-radius: 16px; overflow: hidden; display: grid; place-items: center; color: #fff; font: 700 26px var(--serif); }
.demo-cover img { width: 100%; height: 100%; object-fit: cover; }
.demo-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.demo-body b { font: 700 18px var(--serif); }
.demo-body p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.demo-body .btns { margin-top: 8px; align-items: center; }
.demo-versions { margin: 12px 0 4px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.recent { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--input); border: 1px solid var(--line); color: var(--ink); }
.recent:hover { border-color: var(--accent); text-decoration: none; }
.recent .cover { width: 56px; height: 56px; border-radius: 12px; font-size: 15px; }
.recent .play { position: absolute; left: 30px; top: 30px; width: 30px; height: 30px; font-size: 11px; }
.recent div { display: flex; flex-direction: column; min-width: 0; }
.recent b { font: 650 15px var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 980px) {
  .create-grid, .studio-grid, .settings-grid, .done-card { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; gap: 24px; padding-top: 10px; }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .row4 { grid-template-columns: 1fr 1fr; }
  .modal-body { grid-template-columns: 1fr; }
  .lyric-edit { min-height: 380px; }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .brand small { display: none; }
  .tabs { margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs a { padding: 6px 12px; flex: none; }
  main { padding-top: 14px; }
  .card { padding: 16px; }
  .row2, .row3, .row4, .adv-grid { grid-template-columns: 1fr; gap: 0; }
  .landing-steps { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-cover { width: 88px; height: 88px; }
  .type-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .type { padding: 11px 12px; }
  .type span { display: none; }
  .type b { font-size: 16px; }
  .pd-lyric { columns: 1; }
  .print-doc { padding: 24px 18px; }
  .modes { grid-template-columns: 1fr; }
  .insp { grid-template-columns: 1fr; }
  .combo-list { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .combo-list a { flex: none; }
  .preset-row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 44%; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .preset { scroll-snap-align: start; }
  .studio-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cover.lg { width: 96px; height: 96px; }
  .job-stats { width: 100%; }
  .job-stats div { flex: 1; }
  .search { width: 100% !important; }
  .page-head .tools { width: 100%; }
  .pl-meta { display: none; }
  .go { flex-wrap: wrap; }
  .go .btn.big { max-width: none; }
}
