:root{
  --ink:#1d1a16; --ink2:#4a443c; --muted:#8b8377; --line:#e7e0d2;
  --cream:#faf6ee; --card:#fffdf9; --gold:#b08a45; --gold2:#d9bd8a;
  --ok:#3f8a5f; --warn:#b8842a; --err:#b3564f;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{overflow-x:hidden}
body{
  margin:0;background:#efeae0;color:var(--ink);
  font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  font-size:14px;
}
#app{width:100%;max-width:460px;margin:0 auto;min-height:100vh;background:var(--cream);position:relative;
  box-shadow:0 0 60px rgba(40,33,22,.08);overflow-x:hidden}
.page{min-height:100vh;padding-bottom:84px;display:flex;flex-direction:column}
.pad{padding:0 20px}
.header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px 6px}
.brand{font-size:11px;letter-spacing:3px;color:#a08a5f}
.h1{font-size:26px;font-weight:800;line-height:1.3}
.h2{font-size:15px;font-weight:700}
.small{font-size:12px}
.tiny{font-size:11px}
.muted{color:var(--muted)}
.gold{color:var(--gold)}
.btn{display:flex;align-items:center;justify-content:center;height:52px;border-radius:14px;
  background:linear-gradient(135deg,#c9a15c,#a9823f);color:#fff;font-weight:700;font-size:15px;
  border:0;width:100%;letter-spacing:.5px;box-shadow:0 10px 24px rgba(176,138,69,.26);cursor:pointer}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.5;box-shadow:none}
.btn.ghost{background:#fff;color:var(--ink2);border:1px solid var(--line);box-shadow:none;font-weight:600}
.btn.sm{height:40px;font-size:13px;border-radius:11px;width:auto;padding:0 16px;box-shadow:none}
/* 并排按钮行：子按钮必须 flex:1 且 width:auto，否则 .btn 的 width:100% 会把整行撑爆 */
.btnrow{display:flex;gap:10px}
.btnrow>.btn{flex:1 1 0;width:auto;min-width:0}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px}
.pill{display:inline-flex;align-items:center;padding:7px 13px;border-radius:999px;border:1px solid var(--line);
  background:#fff;font-size:12.5px;color:var(--ink2);cursor:pointer}
.pill.on{border-color:var(--gold);background:#f8f0dd;color:#7d6133;font-weight:600}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.badge{font-size:10.5px;padding:3px 9px;border-radius:999px;border:1px solid #ddd5c5;color:#8b8377;white-space:nowrap}
.badge.ok{color:var(--ok);border-color:#c7ddcd;background:#f2f8f3}
.badge.run{color:var(--warn);border-color:#e5d6b4;background:#fcf6e8}
.badge.err{color:var(--err);border-color:#e9cdca;background:#fcf1f0}
input,textarea,select{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;
  padding:12px 14px;font-size:14px;font-family:inherit;color:var(--ink);outline:none}
input:focus,textarea:focus{border-color:var(--gold2)}
textarea{resize:vertical;line-height:1.75}
.tabbar{position:fixed;left:0;right:0;bottom:0;max-width:460px;margin:0 auto;height:66px;
  border-top:1px solid var(--line);background:rgba(255,253,249,.95);backdrop-filter:blur(10px);
  display:flex;z-index:60}
.tabbar .t{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  font-size:11px;color:#a49a89;cursor:pointer}
.tabbar .t.on{color:var(--ink);font-weight:700}
.tabbar .ic{width:20px;height:20px;border-radius:6px;background:#efe9dc}
.tabbar .t.on .ic{background:var(--gold2)}
.toast{position:fixed;left:50%;bottom:100px;transform:translateX(-50%);background:rgba(35,30,24,.92);
  color:#fff;font-size:12.5px;padding:10px 16px;border-radius:10px;max-width:320px;text-align:center;
  z-index:200;opacity:0;transition:.25s;pointer-events:none;line-height:1.6}
.toast.on{opacity:1}
.modal{position:fixed;inset:0;background:rgba(28,24,18,.45);z-index:150;display:none;align-items:flex-end}
.modal.on{display:flex}
.modal .box{width:100%;max-width:460px;margin:0 auto;background:var(--card);border-radius:22px 22px 0 0;
  padding:20px;animation:up .22s ease-out}
@keyframes up{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
.modal .box h3{margin:0 0 6px;font-size:16px}
.modal .box p{margin:0 0 16px;font-size:12.5px;color:var(--muted);line-height:1.7}

/* ---------- 首页 ---------- */
.hero{height:132px;border-radius:18px;background:linear-gradient(120deg,#2a2420,#4b3f31 68%,#6d5738);
  padding:18px;display:flex;flex-direction:column;justify-content:space-between;cursor:pointer}
.hero .t{font-size:16px;font-weight:800;color:#f3e6cd}
.hero .d{font-size:11.5px;color:#cbbda6;line-height:1.6}
.hero .a{align-self:flex-start;background:#f0dbb0;color:#3a2c18;font-size:12.5px;font-weight:700;
  padding:8px 16px;border-radius:10px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.grid3 .s{aspect-ratio:1/1.04;border:1px solid var(--line);border-radius:14px;background:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer}
.grid3 .s .g{width:34px;height:34px;border-radius:10px;background:#f6eeda;display:grid;place-items:center;
  font-weight:800;color:#7d6133;font-size:13px}
.grid3 .s span{font-size:12px;color:var(--ink2)}
.hscroll{display:flex;gap:12px;overflow-x:auto;padding-bottom:4px}
.mini{min-width:158px;cursor:pointer}
.mini .cov{height:92px;border-radius:12px;background:linear-gradient(140deg,#5b4b36,#b08a45)}
.mini .t{font-size:12.5px;font-weight:600;margin-top:8px}
.creditpill{font-size:11.5px;padding:6px 12px;border-radius:999px;background:#f5eedd;color:#7d6133;cursor:pointer}
.deskpill{font-size:11.5px;padding:6px 10px;border-radius:999px;border:1px solid #e2d8c3;color:#8b7a55;
  text-decoration:none;white-space:nowrap}
.avatar{width:34px;height:34px;border-radius:50%;background:#efe7d6;display:grid;place-items:center;
  font-size:12px;color:#8b7a55;cursor:pointer}

/* ---------- 创作向导 ---------- */
.steps{display:flex;gap:6px}
.steps i{height:3px;border-radius:2px;background:#e9e2d4;flex:1;transition:.2s}
.steps i.on{background:var(--gold)}
.opt{display:flex;gap:12px;align-items:center;border:1px solid var(--line);background:#fff;
  border-radius:14px;padding:13px;margin-bottom:10px;cursor:pointer}
.opt.on{border-color:var(--gold);background:#fdf7ea}
.opt .ic{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-weight:800;
  color:#7d6133;font-size:14px;flex:0 0 auto;background:#f6eeda}
.opt .n{font-size:14px;font-weight:700}
.opt .d{font-size:11px;color:var(--muted);margin-top:3px}
.opt .rd{width:18px;height:18px;border-radius:50%;border:1.5px solid #ddd5c5;flex:0 0 auto}
.opt.on .rd{border-color:var(--gold);background:var(--gold)}
.sg{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sg .s{border:1px solid var(--line);background:#fff;border-radius:13px;padding:12px;cursor:pointer;position:relative}
.sg .s.on{border-color:var(--gold);background:#fdf7ea}
.sg .s b{font-size:13px}
.sg .s .d{font-size:10.5px;color:var(--muted);margin-top:3px}
.sg .s .eq{display:flex;gap:2px;align-items:flex-end;height:16px;margin-top:8px}
.sg .s .eq i{width:3px;background:var(--gold2);border-radius:2px}
.footbar{position:fixed;left:0;right:0;bottom:0;max-width:460px;margin:0 auto;padding:12px 20px 20px;
  background:linear-gradient(180deg,rgba(250,246,238,.6),#faf6ee 40%);z-index:55}
.dl{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #f0eade}
.dl:last-child{border:0}

/* ---------- 生成中 ---------- */
.tl{display:flex;flex-direction:column;padding:4px 0}
.st{display:flex;gap:12px;align-items:flex-start;padding:10px 0}
.st .dot{width:12px;height:12px;border-radius:50%;background:#e9e2d4;margin-top:5px;flex:0 0 auto}
.st.done .dot{background:var(--gold)}
.st.now .dot{background:#fff;border:2px solid var(--gold);box-shadow:0 0 0 4px #f6eede}
.st .nm{font-size:13.5px;font-weight:600}
.st.done .nm{color:var(--muted);text-decoration:line-through;font-weight:500}
.st .stt{font-size:11px;color:var(--muted)}
.st.now .stt{color:var(--gold);font-weight:600}
.spin{width:86px;height:86px;border-radius:50%;margin:0 auto;
  background:radial-gradient(circle,#f6e3ba,#c9a15c);box-shadow:0 14px 34px rgba(176,138,69,.3);
  animation:pulse 2.2s ease-in-out infinite}
@keyframes pulse{0%,100%{transform:scale(1);opacity:.95}50%{transform:scale(1.05);opacity:1}}

/* ---------- 结果 ---------- */
.cover{height:186px;border-radius:18px;position:relative;overflow:hidden;
  background:linear-gradient(150deg,#3a3129,#6d5a3f 55%,#b08a45)}
.cover:after{content:"";position:absolute;inset:0;background:
  radial-gradient(120px 90px at 20% 20%,rgba(255,238,205,.32),transparent 70%),
  radial-gradient(200px 140px at 85% 90%,rgba(0,0,0,.32),transparent 70%)}
.cover .ct{position:absolute;left:18px;bottom:16px;z-index:2;color:#fff}
.cover .ct b{font-size:19px;letter-spacing:1px}
.cover .ct span{display:block;font-size:11px;color:#e0d3ba;margin-top:5px;letter-spacing:2px}
.player{display:flex;align-items:center;gap:14px;margin-top:16px}
.pbtn{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,#c9a15c,#a9823f);
  color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center;flex:0 0 auto;cursor:pointer}
.wave{display:flex;align-items:flex-end;gap:3px;height:48px;flex:1}
.wave i{width:3px;background:linear-gradient(180deg,#d9bd8a,#b08a45);border-radius:2px;transition:height .09s linear}
.wave i.bounce{animation:wavebar .9s ease-in-out infinite;transform-origin:bottom}
@keyframes wavebar{0%,100%{transform:scaleY(.35)}50%{transform:scaleY(1)}}
.pbar{height:3px;border-radius:2px;background:#ece5d6;margin-top:9px;overflow:hidden}
.pfill{height:100%;width:0;background:linear-gradient(90deg,#c9a15c,#a9823f);transition:width .1s linear}
.lyricbox{font-size:13px;line-height:2;color:#5a5349;white-space:pre-wrap;margin-top:10px}
.sheet-fixed{position:fixed;left:0;right:0;bottom:0;max-width:460px;margin:0 auto;background:var(--card);
  border-radius:22px 22px 0 0;box-shadow:0 -14px 40px rgba(40,33,22,.14);padding:14px 20px 22px;z-index:70}
.handle{width:38px;height:4px;border-radius:3px;background:#ddd5c5;margin:0 auto 12px}

/* ---------- 曲库 / 行 ---------- */
.rowitem{display:flex;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid #f1ebdf;cursor:pointer}
.rowitem .cov{width:54px;height:54px;border-radius:12px;background:linear-gradient(140deg,#5b4b36,#b08a45);flex:0 0 auto}
.rowitem .t{font-size:13.5px;font-weight:700}
.rowitem .d{font-size:11px;color:var(--muted);margin-top:4px}
.empty{text-align:center;padding:48px 20px;color:var(--muted);font-size:13px;line-height:1.8}

/* ---------- 套餐 ---------- */
.pkg{border:1.5px solid var(--line);background:#fff;border-radius:15px;padding:16px;margin-bottom:12px;
  position:relative;cursor:pointer}
.pkg.on{border-color:var(--gold);background:#fdf7ea}
.pkg .badgex{position:absolute;right:14px;top:-9px;background:var(--gold);color:#fff;font-size:10px;
  padding:3px 9px;border-radius:999px}
.pkg .row{display:flex;justify-content:space-between;align-items:baseline}
.pkg .n{font-size:14px;font-weight:700}
.pkg .u{font-size:11px;color:var(--muted);margin-top:4px}
.pkg .p{font-size:20px;font-weight:800;color:#7d6133}
.statrow{display:flex;gap:10px}
.statrow .c{flex:1;background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px;text-align:center}
.statrow .c b{font-size:19px;color:#7d6133}
.listbox{background:#fff;border:1px solid var(--line);border-radius:13px;overflow:hidden}
.li{display:flex;justify-content:space-between;padding:14px 15px;border-bottom:1px solid #f2ece0;font-size:13px;cursor:pointer}
.li:last-child{border:0}

/* ---------- AIGC 标识 ---------- */
.aigcnote{display:flex;align-items:center;gap:8px;justify-content:center;
  margin-top:10px;font-size:11px;color:#8a7f6d;line-height:1.7;flex-wrap:wrap}
.aigc-tag{display:inline-block;padding:2px 8px;border-radius:6px;font-size:10.5px;font-weight:700;
  color:#7d6133;background:rgba(201,161,92,.14);border:1px solid rgba(201,161,92,.35);letter-spacing:.5px}
