:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text2: #8a8a8a;
  --text3: #666666;
  --border: #eeeeee;
  --border2: #e5e5e5;
  --accent: #ff4757;
  --accent2: #ff6b81;
  --accent-gradient: linear-gradient(135deg, #ff4757, #ff6348);
  --purple-gradient: linear-gradient(135deg, #8e44ad, #9b59b6);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-height: 64px;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; }
::-webkit-scrollbar { width:0; height:0; }

/* ===== 页面视口（Router 注入容器） ===== */
.page-viewport {
  position: fixed; inset: 0;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom));
  overflow: hidden;
  transition: padding-bottom .25s ease;
}
.page-viewport.has-player {
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 62px);
}

/* ===== 页面容器（每个 page div） ===== */
.page {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ===== 页面加载中 ===== */
.page-loading {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 14px; color: var(--text2);
}
.page-loading .spinner {
  width: 22px; height: 22px; border: 2px solid var(--border2);
  border-top: 2px solid var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; margin-right: 8px;
}

/* ===== 状态栏模拟 ===== */
.status-bar {
  height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; font-size: 15px; font-weight: 600;
  background: transparent;
}
.status-bar .time { letter-spacing: 0.5px; }
.status-bar .icons { display:flex; gap:5px; align-items:center; font-size:13px; }

/* ===== 顶部导航（创作页） ===== */
.create-navbar {
  height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
}
.create-navbar .nav-left { width: 80px; }
.create-navbar .nav-title {
  flex:1; text-align: center; font-size: 17px; font-weight: 600;
}
.create-navbar .nav-right {
  width: 80px; display: flex; justify-content: flex-end; gap: 8px;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text);
}
.icon-btn:active { background: var(--border); }

/* ===== 顶部登录态展示 ===== */
.login-status {
  display: flex; flex-direction: row; align-items: center; gap: 4px;
  cursor: pointer; user-select: none; margin-right: 4px;
}
.login-status .ls-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px;
  border: 1px solid rgba(255,255,255,.5);
}
.login-status .ls-avatar img { width: 100%; height: 100%; object-fit: cover; }
.login-status .ls-name {
  font-size: 12px; color: var(--text); max-width: 64px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 音豆数量：显示在头像右边 */
.login-status .ls-coin {
  display: flex; align-items: center; gap: 2px;
  font-size: 11px; color: #e67e22; font-weight: 600;
  line-height: 1; white-space: nowrap;
}
.login-status .ls-coin-icon {
  display: inline-flex; align-items: center; justify-content: center;
}
.login-status .ls-coin-icon svg { display: block; }
.login-status .ls-login-btn {
  font-size: 12px; color: var(--accent); border: 1px solid var(--accent);
  padding: 4px 10px; border-radius: 999px; background: transparent;
  cursor: pointer; font-weight: 500; white-space: nowrap;
}
.login-status .ls-login-btn:active { background: var(--accent); color: #fff; }

/* ===== 分页加载底部提示 ===== */
.pager-footer {
  text-align: center; padding: 14px; font-size: 13px; color: var(--text3);
}
.pager-footer.loading { color: var(--accent); cursor: pointer; }
.pager-footer.loading:active { opacity: .7; }
.pager-footer.end { color: var(--text3); }

.example-pill {
  padding: 5px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border2);
  font-size: 12px; color: var(--text3);
  display: flex; align-items: center; gap: 4px;
}
.example-pill:active { background: var(--border); }

/* ===== 滚动内容区 ===== */
.create-scroll, .mine-scroll {
  flex:1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 16px;
}

/* ===== 区块标题 ===== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0 10px;
}
.section-title {
  font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.help-icon {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--border2); color: var(--text2);
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}

.sec-help-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #f0f4ff, #e8ecf8);
  border: 1px solid rgba(99,102,241,.3);
  color: #6366f1; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.sec-help-btn:hover {
  background: linear-gradient(135deg, #e0e7ff, #d4d9f0);
  box-shadow: 0 2px 8px rgba(99,102,241,.15);
}
.sec-help-btn:active {
  background: #c7d2fe;
  transform: scale(.96);
}
/* ===== 模式切换 ===== */
.mode-toggle {
  display: flex; gap: 0;
  margin: 0 14px; background: var(--border);
  border-radius: 10px; padding: 3px;
}
.mode-tab {
  flex: 1; padding: 10px 0; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text2);
  background: transparent; border: none; cursor: pointer;
  text-align: center;
}
.mode-tab.active {
  background: #fff; color: var(--accent);
  font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ===== 灵感模式 ===== */
.inspiration-card {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border); padding: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.inspiration-textarea {
  width: 100%; min-height: 160px;
  background: transparent; border: none; outline: none;
  font-size: 15px; line-height: 1.7; color: var(--text);
  resize: vertical; font-family: inherit;
}
.inspiration-textarea::placeholder { color: #cccccc; }
.inspiration-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}

/* 帮我找灵感按钮 */
.find-inspiration-btn {
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
  color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(108,92,231,.25);
  transition: opacity .15s, transform .15s;
}
.find-inspiration-btn:active { opacity: .85; transform: scale(.98); }
.find-inspiration-btn:disabled { opacity: .6; transform: none; }
.find-inspiration-btn .spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
  border-top: 2px solid #fff; border-radius: 50%; animation: spin .8s linear infinite;
}

/* ===== 歌词编辑卡片 ===== */
.lyrics-card {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border); padding: 12px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.lyrics-ver-tabs {
  display: flex; gap: 8px; margin-bottom: 8px;
  padding: 0 2px;
}
.lyrics-ver-tab {
  padding: 6px 16px; border-radius: 8px;
  background: var(--bg2); border: 1px solid var(--border2);
  font-size: 13px; color: var(--text3); cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.lyrics-ver-tab.active {
  background: var(--accent); color: #fff;
  border-color: transparent; font-weight: 600;
}
.lyrics-ver-tab:active { opacity: .85; }
.ai-write-btn {
  padding: 6px 12px; border-radius: 999px;
  background: #fff5f6; color: var(--accent);
  border: 1px solid rgba(255,71,87,.15);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.ai-write-btn:active { background: #ffe0e3; }
.lyrics-textarea {
  width: 100%; min-height: 220px; padding: 38px 8px 8px;
  background: transparent; border: none; outline: none;
  font-size: 15px; line-height: 1.85; color: var(--text);
  resize: none; font-family: inherit;
}
.lyrics-textarea::placeholder { color: #cccccc; }
.clear-text-btn {
  position: absolute; bottom: 10px; right: 12px;
  font-size: 12px; color: var(--text2);
  display: flex; align-items: center; gap: 2px;
}

/* ===== 段落标签横向滚动 ===== */
.tag-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0; margin-top: 12px;
  -webkit-overflow-scrolling: touch;
}
.tag-pill {
  flex-shrink: 0; padding: 7px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border2);
  font-size: 13px; color: var(--text3);
}
.tag-pill:active { background: var(--border); }

/* ===== 风格推荐 ===== */
.style-recommend {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 16px;
}
.rec-btn {
  padding: 8px 16px; border-radius: 999px;
  background: var(--purple-gradient); color: #fff;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.rec-btn:active { opacity: .9; }
.rec-or { font-size: 12px; color: var(--text2); }

/* ===== 风格分类 tabs ===== */
.style-categories {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}
.cat-btn {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border2);
  font-size: 13px; color: var(--text3);
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.cat-btn.active {
  background: var(--surface); border-color: var(--accent); color: var(--accent);
  font-weight: 600;
}
.cat-btn:active { background: var(--border); }

/* ===== 风格选项 ===== */
.style-options-wrap {
  overflow: hidden; transition: max-height .35s ease;
}
.style-options-wrap.style-collapsed {
  max-height: calc(42px * 2);   /* 2行：每行约34px+8px gap */
}
.style-options-wrap.style-expanded {
  max-height: 2000px;
}
.style-options {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-bottom: 4px;
}
.expand-style-btn {
  display: block; margin: 6px auto 2px;
  padding: 5px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border2);
  font-size: 12px; color: var(--text2); cursor: pointer;
}
.expand-style-btn:hover { background: var(--border); }
.opt-pill {
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border2);
  font-size: 13px; color: var(--text3);
}
.opt-pill.selected {
  background: #fff5f6; border-color: var(--accent); color: var(--accent);
  font-weight: 500;
}
.opt-pill:active { background: var(--border); }

/* ===== 自定义风格输入 ===== */
.custom-style-input-wrap {
  display: flex; gap: 8px; align-items: center;
}
.custom-style-input {
  flex: 1; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border2); font-size: 13px;
  color: var(--text); background: #fff;
  outline: none; transition: border-color .2s;
}
.custom-style-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,71,87,0.08);
}
.custom-style-input::placeholder {
  color: var(--text4); font-size: 12px;
}
.custom-style-add-btn {
  padding: 8px 18px; border-radius: 999px;
  background: var(--accent); color: #fff;
  border: none; font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: opacity .2s;
}
.custom-style-add-btn:hover { opacity: 0.88; }
.custom-style-add-btn:active { opacity: 0.75; }

/* ===== 风格描述输入 ===== */
.style-input-wrap {
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border); padding: 12px;
  margin-top: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
/* 风格标签容器（替代 textarea） */
.style-tags-container {
  min-height: 80px;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: flex-start; align-content: flex-start;
  padding: 4px 0;
}
.style-placeholder {
  font-size: 14px; color: #cccccc;
  line-height: 72px;
  pointer-events: none;
}
.style-tag {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 7px 26px 7px 14px;
  background: #fff5f6; border: 1px solid rgba(255,71,87,.18);
  border-radius: 999px;
  font-size: 13px; color: var(--accent);
  font-weight: 500;
  cursor: default;
  user-select: none;
}
.tag-x {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 13px; color: var(--text2);
  cursor: pointer; line-height: 1;
  position: absolute; top: 2px; right: 2px;
}
.tag-x:hover {
  background: rgba(255,71,87,.12); color: var(--accent);
  font-weight: 700;
}
.style-input-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
}
.char-count { font-size: 12px; color: var(--text2); }
.clear-style-btn { font-size: 12px; color: var(--text2); }

/* ===== 预览按钮 ===== */
.preview-row {
  margin: 0 14px 12px;
  display: flex; gap: 10px;
}
.preview-btn {
  flex: 1; padding: 10px 0; border-radius: 8px;
  background: #fff; color: #5b6abf;
  border: 1px dashed rgba(91,106,191,.40);
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.preview-btn:hover { background: #f5f6ff; border-color: rgba(91,106,191,.55); }
.preview-btn:active { background: #eef0fa; }
.preview-btn.primary {
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
}
.preview-btn.primary:hover { background: var(--accent-hover, #4a7de0); border-color: var(--accent-hover, #4a7de0); }
.preview-btn.primary:active { opacity: .85; }

/* ===== 更多设置折叠 ===== */
.more-settings {
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border); margin-top: 12px;
  overflow: hidden;
}
.more-settings-header {
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.more-settings-header .arrow { font-size: 11px; color: var(--text2); transition: transform .25s; }
.more-settings.open .more-settings-header .arrow { transform: rotate(180deg); }
.more-settings-body {
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.more-settings.open .more-settings-body { max-height: 1200px; }
.more-settings-inner {
  padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px;
}

/* ===== 表单元素 ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; color: var(--text3); font-weight: 500; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: #f8f9fa; color: var(--text);
  border: 1px solid var(--border2); font-size: 14px;
  outline: none; font-family: inherit;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 64px; line-height: 1.6; }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8a' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.checkbox-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text3);
}
.checkbox-row input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer;
}
.slider-group { display: flex; align-items: center; gap: 10px; }
.slider-group input[type=range] {
  flex:1; -webkit-appearance:none; height:5px; border-radius:5px;
  background: var(--border2); outline:none;
}
.slider-group input[type=range]::-webkit-slider-thumb {
  -webkit-appearance:none; width:20px; height:20px; border-radius:50%;
  background: var(--accent); cursor:pointer;
}
.slider-val { font-size: 12px; color: var(--accent); min-width: 36px; text-align: right; font-weight: 600; }

/* ===== 纯音乐开关 ===== */
.instrumental-toggle-wrap {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 12px 16px;
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border);
}
.inst-left {
  display: flex; align-items: center; gap: 14px;
}
.inst-label { font-size: 14px; font-weight: 500; color: var(--text); }
.toggle-switch {
  position: relative; display: inline-block; width: 48px; height: 28px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: #dcdcdc; border-radius: 28px; transition: .25s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 22px; width: 22px;
  left: 3px; bottom: 3px; background: #fff;
  border-radius: 50%; transition: .25s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ===== 生成按钮 ===== */
.generate-btn {
  width: 100%; margin-top: 18px; padding: 15px;
  border-radius: 12px;
  background: var(--accent-gradient); color: #fff;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 16px rgba(255,71,87,.25);
}
.generate-btn:active { opacity: .9; transform: scale(.99); }
.generate-btn:disabled { opacity: .6; transform: none; }
.generate-btn .spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
  border-top: 2px solid #fff; border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border2);
  border-top: 2px solid var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; display: inline-block;
}

/* ===== 生成状态 ===== */
.gen-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; margin-top: 12px;
  color: var(--text3); font-size: 13px;
}
.gen-status .spinner {
  width: 14px; height: 14px; border: 2px solid var(--border2);
  border-top: 2px solid var(--accent); border-radius: 50%; animation: spin .8s linear infinite;
}

/* ===== 结果列表 ===== */
.results-section {
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border); padding: 14px 16px;
  margin-top: 16px;
}
.results-section h3 {
  font-size: 15px; font-weight: 600; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.results-section h3 .count { font-size: 12px; color: var(--text2); font-weight: 400; }
.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-card {
  background: #f8f9fa; border-radius: 10px; padding: 12px;
  border: 1px solid var(--border);
}
.rc-body { display: flex; gap: 10px; align-items: flex-start; }
.rc-cover {
  width: 52px; height: 52px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; background: #ececec;
}
.rc-cover-empty {
  width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #ff6b81, #ff4757);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}
.rc-content { flex: 1; min-width: 0; }
.rc-tags {
  font-size: 11px; color: #e67e22; margin-bottom: 4px;
  line-height: 1.5; word-break: break-word;
  /* 默认最多占 2 行，超出折叠 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-tags.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
/* 提示词"加载更多/收起"按钮 */
.rc-tags-more {
  display: block; margin-top: 3px; padding: 0;
  font-size: 11px; color: var(--accent); background: none; border: none;
  cursor: pointer; text-align: left;
}
.rc-time {
  font-size: 10px; color: var(--text2); margin-bottom: 4px;
}
.result-card .rc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.result-card .rc-title-wrap {
  display: inline-flex; align-items: center; min-width: 0; flex: 1;
}
.result-card .rc-title { font-size: 13px; font-weight: 600; }
.result-card .rc-status {
  font-size: 10px; padding: 3px 8px; border-radius: 10px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0; margin-left: 8px;
}
.rc-instrumental-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 8px; font-weight: 600;
  display: inline-flex; align-items: center; margin-left: 4px;
  background: rgba(155,89,182,.12); color: #8e44ad;
  flex-shrink: 0;
}
.result-card .rc-status.completed { background: rgba(39,174,96,.12); color: #27ae60; }
.result-card .rc-status.processing { background: rgba(241,196,15,.15); color: #e67e22; }
.result-card .rc-status.converting { background: rgba(52,152,219,.12); color: #2980b9; }
.rc-mini-spinner {
  display: inline-block; width: 10px; height: 10px;
  border: 1.5px solid rgba(41,128,185,.3);
  border-top-color: #2980b9; border-radius: 50%;
  animation: rc-spin .7s linear infinite;
}
@keyframes rc-spin { to { transform: rotate(360deg); } }
.result-card audio { width: 100%; height: 32px; margin-top: 6px; }
.rc-audio-msg {
  font-size: 11px; color: #e67e22; text-align: center; padding: 8px 0;
  background: rgba(241,196,15,.08); border-radius: 6px; margin-top: 6px;
}
.result-card .rc-actions {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.rc-player-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
}
.rc-player-row .rc-actions { margin-top: 0; }
.rc-play-btn {
  flex-shrink: 0;
  padding: 6px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: var(--accent-gradient); color: #fff;
  border: none; white-space: nowrap;
  transition: transform .12s, opacity .12s;
}
.rc-play-btn:active { transform: scale(.95); opacity: .85; }
.rc-play-btn.playing {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}
.rc-play-btn.paused {
  background: #fff; color: var(--accent);
  border: 1px solid var(--accent);
}
.rc-play-btn.disabled {
  background: var(--border); color: var(--text2); cursor: not-allowed;
}
.rc-action {
  padding: 5px 10px; border-radius: 5px; font-size: 11px;
  background: #fff; color: var(--text3);
  border: 1px solid var(--border2); cursor: pointer;
}
.rc-action:active { background: var(--border); }
.bottom-safe { height: 20px; flex-shrink: 0; }

/* ===== 底部 Tab ===== */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,.98); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; align-items: center;
}
.tab-item {
  flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text2); font-size: 11px;
}
.tab-item.active { color: var(--accent); }
.tab-icon { font-size: 22px; line-height: 1; }

/* ===== 我的页面 ===== */
.mine-header {
  background: linear-gradient(180deg, #7fcdbb 0%, #5fb3c3 60%, var(--bg) 100%);
  padding-bottom: 24px; flex-shrink: 0;
}
.mine-navbar {
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
}
.mine-navbar .nav-title { flex:1; text-align:center; font-size:17px; font-weight:600; color:#fff; }
.mine-navbar .nav-right { display:flex; gap:8px; }
.mine-navbar .icon-btn { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.3); color:#fff; }

.user-card {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 10px;
}
.avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: #ff6b35; border: 3px solid rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.nickname {
  margin-top: 12px; font-size: 18px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.user-id {
  margin-top: 4px; font-size: 12px; color: rgba(255,255,255,.85);
}
.user-actions {
  display: flex; gap: 12px; margin-top: 16px;
}
.user-actions button {
  min-width: 120px; padding: 9px 16px; border-radius: 20px;
  background: rgba(255,255,255,.9); color: var(--text);
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.user-actions button:active { background: #fff; }

/* ===== 菜单列表 ===== */
.mine-menu {
  flex:1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 16px;
}
.menu-card {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border); padding: 8px 0;
  margin-top: -10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #f8f9fa; }
.menu-item::after {
  content: '›'; margin-left: auto; color: var(--text2); font-size: 18px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot.orange { background: #ff9500; }
.dot.purple { background: #8e44ad; }
.dot.red { background: #ff4757; }
.dot.cyan { background: #17c0eb; }
.dot.pink { background: #ff6b81; }
.dot.green { background: #2ed573; }
.dot.blue { background: #3498db; }

/* ===== 同步状态 ===== */
.sync-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 0; font-size: 11px; color: var(--text2);
}
.sync-dot { width: 6px; height: 6px; border-radius: 50%; }
.sync-dot.syncing { background: #ff9800; animation: pulse .8s infinite; }
.sync-dot.synced { background: #2ed573; }
.sync-dot.error { background: #ff4757; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ===== 版本选择底部弹窗 ===== */
.modal-overlay {
  position: fixed; inset:0; z-index:5000; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-sheet {
  width: 100%; max-width: 500px; max-height: 70vh;
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(var(--tab-height) + 20px + var(--safe-bottom));
  display: flex; flex-direction: column;
  overflow-y: auto; animation: sheetUp .3s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-sheet h4 { font-size: 16px; margin: 0; font-weight: 600; }
.modal-header {
  display: flex; align-items: center; justify-content: center;
  position: relative; margin-bottom: 14px;
}
.modal-x-btn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text3); cursor: pointer; border-radius: 50%;
  transition: background .15s; line-height: 1; user-select: none;
}
.modal-x-btn:hover { background: #f0f0f0; color: var(--text); }
.modal-x-btn:active { background: #e0e0e0; }
.ver-list { display: flex; flex-direction: column; gap: 8px; }
.ver-item {
  padding: 13px 14px; border-radius: 10px; background: #f8f9fa;
  border: 1px solid var(--border); cursor: pointer; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.ver-item:active { border-color: var(--accent); background: #fff5f6; }
.ver-item.active { border-color: var(--accent); background: #fff5f6; color: var(--accent); }
.modal-close {
  display: block; width: 100%; margin-top: 14px; padding: 13px;
  border-radius: 10px; background: #f8f9fa; color: var(--text);
  border: 1px solid var(--border2); font-size: 15px; cursor: pointer; text-align: center;
  font-weight: 500;
}
.modal-close:active { background: var(--border); }

/* ===== 登录引导弹窗 ===== */
.login-sheet { align-items: center; text-align: center; gap: 10px; }
.login-icon { font-size: 48px; margin: 8px 0; }
.login-sheet h4 { font-size: 18px; }
.login-tip { font-size: 13px; color: var(--text2); margin: 0 0 8px; line-height: 1.6; }
.login-confirm-btn {
  width: 100%; padding: 13px; border-radius: 10px; background: var(--accent);
  color: #fff; border: none; font-size: 16px; font-weight: 600; cursor: pointer;
  margin-top: 4px;
}
.login-confirm-btn:active { opacity: .8; }

/* ===== 分页加载底部提示 ===== */
.pager-footer {
  text-align: center; padding: 14px; font-size: 13px; color: var(--text3);
}
.pager-footer.loading { color: var(--accent); cursor: pointer; }
.pager-footer.loading:active { opacity: .7; }
.pager-footer.end { color: var(--text3); }

/* ===== 风格推荐弹窗 ===== */
.style-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.style-card {
  padding: 14px; border-radius: 12px; background: #f8f9fa;
  border: 1px solid var(--border); text-align: center; cursor: pointer;
  font-size: 13px; font-weight: 500;
}
.style-card:active { border-color: var(--accent); background: #fff5f6; }

/* ===== 选中文本悬浮菜单 ===== */
.float-menu {
  position: absolute; z-index:3000; background: var(--surface);
  border-radius: 10px; border: 1px solid var(--border);
  padding: 4px; display: none; box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.float-menu .fm-item {
  display: block; width: 100%; padding: 10px 16px; font-size: 14px;
  background: none; color: var(--text); border: none;
  text-align: left; cursor: pointer; border-radius: 8px;
  white-space: nowrap;
}
.float-menu .fm-item:active { background: #f8f9fa; }

/* ===== 灵感挑选弹窗 ===== */
.inspiration-modal-sheet { max-height: 80vh; margin-bottom: 18vh; }
.insp-section { margin-bottom: 10px; }
.insp-section-label {
  font-size: 13px; font-weight: 600; color: var(--text3);
  margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between;
}
.insp-chips-wrap { position: relative; }
.insp-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 72px; overflow: hidden; transition: max-height .3s ease;
}
.insp-chips.expanded { max-height: 600px; overflow-y: auto; }
.insp-chip {
  padding: 5px 13px; border-radius: 999px;
  background: #f8f9fa; border: 1px solid var(--border2);
  font-size: 12px; color: var(--text3); cursor: pointer;
  white-space: nowrap; user-select: none;
  transition: all .15s;
}
.insp-chip:active { background: #eee; }
.insp-chip.selected {
  background: #ede7f6; border-color: #6c5ce7; color: #6c5ce7;
  font-weight: 600;
}
.insp-chip-loading {
  font-size: 12px; color: var(--text2); padding: 4px 0;
}
.insp-expand-btn {
  display: block; width: 100%; margin-top: 4px; padding: 3px 0;
  font-size: 11px; color: var(--text3); background: none; border: none;
  cursor: pointer; text-align: center;
}
.insp-expand-btn:hover { color: var(--text); }
.insp-expand-btn.hidden { display: none; }
.insp-result-box {
  min-height: 80px; padding: 14px;
  background: #f8f9fa; border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 16px; font-size: 14px; color: var(--text);
  line-height: 1.7; display: flex; align-items: center; justify-content: center;
}
.insp-result-placeholder {
  color: #ccc; font-size: 13px; text-align: center;
}
.modal-action-row {
  display: flex; gap: 10px; margin-top: 10px;
}
.modal-action-btn {
  padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; background: #f8f9fa; color: var(--text);
  border: 1px solid var(--border2); text-align: center; flex: 1;
}
.modal-action-btn:active { background: var(--border); }
.modal-action-btn.primary {
  flex: 2; background: linear-gradient(135deg, #a29bfe, #6c5ce7); color: #fff;
  border: none; box-shadow: 0 4px 12px rgba(108,92,231,.25);
}
.modal-action-btn.primary:active { opacity: .85; }
.modal-action-btn:disabled { opacity: .6; }
.modal-action-btn .spinner {
  display: inline-block; width: 16px; height: 16px; vertical-align: middle;
  border: 2px solid rgba(255,255,255,.3);
  border-top: 2px solid #fff; border-radius: 50%; animation: spin .8s linear infinite;
  margin-right: 6px;
}

/* ===== 分页加载底部提示 ===== */
.pager-footer {
  text-align: center; padding: 14px; font-size: 13px; color: var(--text3);
}
.pager-footer.loading { color: var(--accent); cursor: pointer; }
.pager-footer.loading:active { opacity: .7; }
.pager-footer.end { color: var(--text3); }

/* ===== 风格推荐弹窗 ===== */
.style-grid {
  display: flex; flex-direction: column; gap: 8px;
}
.style-card {
  padding: 14px 16px; border-radius: 10px; background: #f8f9fa;
  border: 1px solid var(--border2); font-size: 14px; font-weight: 500;
  color: var(--text); cursor: pointer; transition: all .15s; user-select: none;
}
.style-card:hover { background: #ede7f6; border-color: #6c5ce7; }
.style-card:active { transform: scale(.98); }

/* ===== Toast ===== */
.toast {
  position: fixed; top:60px; left:50%; transform:translateX(-50%); z-index:9999;
  padding: 10px 22px; border-radius: 8px; font-size: 13px;
  color: #fff; animation: toastIn .3s ease; pointer-events: none;
  white-space: nowrap; font-weight: 500;
}
.toast.error { background: #e74c3c; }
.toast.success { background: #27ae60; }
.toast.info { background: #2980b9; }
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.hidden { display: none !important; }

/* ===== 全局播放器浮层 ===== */
.global-player {
  position: fixed; bottom: calc(var(--tab-height) + var(--safe-bottom));
  left: 0; right: 0; z-index: 900;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  transition: transform .25s ease;
}
.global-player.hidden { transform: translateY(100%); }
/* 播放器上方：当前歌词一行（背景透明，点击查看完整歌词） */
.gp-lyric-line {
  position: relative; z-index: 1;
  padding: 8px 16px 4px;
  font-size: 14px; font-weight: 500; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: transparent;   /* 透明背景 */
  min-height: 22px;
  line-height: 1.4;
  cursor: pointer;           /* 可点击查看完整歌词 */
  /* 用主题色渐变突出"正在播放"，加轻微发光提升可读性 */
  background: linear-gradient(135deg, #ff7f50, #ff9f43);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 4px rgba(255,143,67,.25);
}
.gp-lyric-line:active { opacity: .75; }
.gp-lyric-line.hidden { display: none; }
.gp-progress {
  height: 3px; background: var(--border2); cursor: pointer;
  position: relative;
}
.gp-progress-fill {
  height: 100%; background: var(--accent);
  width: 0%; transition: width .15s linear;
  border-radius: 0 2px 2px 0;
}
.gp-body {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; gap: 10px;
}
.gp-info {
  flex: 1; display: flex; align-items: center; gap: 10px;
  min-width: 0; cursor: pointer;
}
.gp-cover {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-gradient); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; overflow: hidden;
}
.gp-meta { min-width: 0; }
.gp-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 200px;
}
.gp-time {
  font-size: 11px; color: var(--text2); margin-top: 2px;
}
.gp-controls {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.gp-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-gradient); color: #fff;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  transition: transform .12s;
}
.gp-btn:active { transform: scale(.9); }
.gp-btn-lyrics {
  background: rgba(255,71,87,.08); color: var(--accent);
  width: 32px; height: 32px; font-size: 14px;
}
.gp-btn-lyrics:active { background: rgba(255,71,87,.18); }
.gp-btn-close {
  background: none; color: var(--text2); font-size: 16px;
  width: 28px; height: 28px;
}
.gp-btn-close:active { background: rgba(0,0,0,.06); }

/* ===== 首页 ===== */
.home-scroll {
  flex:1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 16px;
}
.home-hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 0 20px;
}
.home-logo {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(255,71,87,.25);
}
.home-title {
  font-size: 22px; font-weight: 700; color: var(--text);
}
.home-subtitle {
  margin-top: 6px; font-size: 13px; color: var(--text2);
}
.home-stats {
  display: flex; gap: 12px; margin-bottom: 16px;
}
.stat-card {
  flex: 1; background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border); padding: 16px 12px;
  text-align: center; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}
.stat-card:active { background: #f8f9fa; }
.stat-num {
  font-size: 28px; font-weight: 700; color: var(--accent);
}
.stat-label {
  margin-top: 4px; font-size: 12px; color: var(--text2);
}
.home-actions {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;
}
.home-action-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  text-align: left; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}
.home-action-btn:active { background: #f8f9fa; }
.home-action-btn.primary {
  background: rgba(255,71,87,.06); border-color: rgba(255,71,87,.2);
}
.ha-icon { font-size: 28px; flex-shrink: 0; }
.ha-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ha-desc { font-size: 12px; color: var(--text2); margin-top: 2px; }
.view-all-btn {
  font-size: 12px; color: var(--accent); padding: 4px 10px;
  border-radius: 999px; background: #fff5f6;
  border: 1px solid rgba(255,71,87,.15);
}
.view-all-btn:active { background: #ffe0e3; }

/* ===== 音乐页面 ===== */
.music-scroll {
  flex:1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 16px;
}
.section-count {
  font-size: 13px; color: var(--text2); font-weight: 400;
}
.lyric-card .rc-header { margin-bottom: 8px; }
.music-overview {
  display: flex; gap: 12px; margin: 16px 0 20px;
}
.music-stat {
  flex: 1; background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border); padding: 16px 12px;
  text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.03);
}
.music-stat-num {
  font-size: 28px; font-weight: 700; color: var(--accent);
}
.music-stat-label {
  margin-top: 4px; font-size: 12px; color: var(--text2);
}
.music-list {
  display: flex; flex-direction: column; gap: 10px;
}

/* ===== 歌词段落块 ===== */
.lyric-block {
  background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  overflow: hidden;
}
.lyric-block-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: background .15s;
}
.lyric-block-header:active { background: rgba(0,0,0,.02); }
.lyric-block[data-expanded="true"] .lyric-block-header {
  border-bottom-color: var(--border);
}
.lyric-block-info {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0; flex: 1;
}
.lyric-block-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lyric-block-name {
  overflow: hidden; text-overflow: ellipsis;
}
.lyric-block-preview {
  font-size: 12px; color: var(--text2); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lyric-block-right {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; margin-left: 12px;
}
.lyric-block-meta {
  font-size: 11px; color: var(--text2); white-space: nowrap;
}
.lyric-block-arrow {
  font-size: 11px; color: var(--text2);
  transition: transform .2s;
}
.lyric-block[data-expanded="true"] .lyric-block-arrow {
  transform: rotate(90deg);
}
.lyric-block-music-count {
  font-size: 12px; color: var(--accent); white-space: nowrap;
  font-weight: 500;
}
.lyric-associated-musics {
  display: none;
  padding: 8px 12px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.lyric-block[data-expanded="true"] .lyric-associated-musics {
  display: block;
}
.lyric-associated-musics .result-card {
  margin-bottom: 8px;
}
.lyric-associated-musics .result-card:last-child {
  margin-bottom: 0;
}
.lyric-associated-musics .rc-cover {
  width: 36px; height: 36px;
  border-radius: 6px;
}
.lyric-associated-musics .rc-title {
  font-size: 13px;
}
.lyric-associated-musics .rc-tags {
  font-size: 10px;
}
.lyric-associated-musics .rc-time {
  font-size: 10px;
}
.lyric-associated-musics .rc-play-btn {
  font-size: 11px; padding: 4px 10px;
}
.lyric-associated-musics .rc-action {
  font-size: 11px; padding: 3px 8px;
}
/* ===== 收藏按钮 ===== */
.fav-btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; padding: 0 4px; line-height: 1;
  transition: transform .15s; flex-shrink: 0;
}
.fav-btn:active { transform: scale(1.2); }
.lyric-associated-musics .fav-btn {
  font-size: 16px; padding: 0 3px;
}
.lyric-edit-btn {
  background: var(--accent); color: #fff; border: none;
  font-size: 12px; padding: 5px 12px; border-radius: 14px;
  cursor: pointer; white-space: nowrap;
  transition: opacity .15s;
}
.lyric-edit-btn:active { opacity: .7; }

/* ===== 段落卡片 ===== */
.section-card {
  margin: 10px 14px;
  background: #f8f9fa; border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px;
  position: relative;
}
.section-card:last-of-type { margin-bottom: 12px; }
.sc-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.sc-type-select {
  padding: 4px 8px; border-radius: 6px;
  background: #fff; color: var(--accent);
  border: 1px solid rgba(255,71,87,.2);
  font-size: 13px; font-weight: 600;
  outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23ff4757' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  padding-right: 24px;
}

.sc-content {
  width: 100%; min-height: 60px; padding: 8px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; line-height: 1.75;
  color: var(--text); outline: none; resize: none; overflow: hidden;
  font-family: inherit; transition: border-color .15s;
}
.sc-content:focus { border-color: var(--accent); }
.sc-content::placeholder { color: #ccc; }

/* ===== 段落标签行 ===== */
.sc-tags {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 8px;
}
.sc-tag-row {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.sc-tag-label {
  font-size: 11px; color: var(--text3); font-weight: 500;
  min-width: 32px; flex-shrink: 0;
}
.sc-tag-chips {
  display: flex; gap: 4px; flex-wrap: wrap; flex: 1;
  min-width: 0;
}
.sc-tag-empty {
  font-size: 11px; color: #bbb;
  font-style: italic;
  padding: 2px 0;
}
.sc-tag-chip {
  display: inline-flex; align-items: center;
  padding: 2px 20px 2px 8px;
  background: #fff; border: 1px solid var(--border2);
  border-radius: 999px; font-size: 11px; color: var(--text3);
  position: relative; white-space: nowrap;
}
.sc-tag-x {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  font-size: 11px; color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.sc-tag-x:hover { background: rgba(255,71,87,.12); color: var(--accent); }
.sc-tag-add {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,71,87,.08); color: var(--accent);
  border: 1px solid rgba(255,71,87,.18);
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.sc-tag-add:active { background: rgba(255,71,87,.18); }

/* ===== 属性收起/展开 ===== */
.sc-tags-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 4px 5px;
  cursor: pointer; user-select: none;
  border-radius: 6px; transition: background .12s;
}
.sc-tags-toggle:hover { background: rgba(0,0,0,.03); }
.sc-tags-toggle:active { background: rgba(0,0,0,.06); }
.sc-tgs-icon {
  font-size: 13px; opacity: .55;
}
.sc-tgs-label {
  font-size: 12px; color: var(--text3); font-weight: 500;
}
.sc-tgs-arrow {
  font-size: 10px; color: var(--text3); margin-left: auto;
  transition: transform .15s;
}
.sc-tags { overflow: hidden; }
.sc-tags-collapsed { max-height: 0; opacity: 0; margin: 0; transition: max-height .2s, opacity .15s, margin .2s; }
.sc-tags-expanded { max-height: 360px; opacity: 1; margin-top: 6px; transition: max-height .25s, opacity .2s .05s, margin .2s; }

/* ===== 段落操作按钮 ===== */
.sc-move-btns {
  display: flex; align-items: center; gap: 4px;
}
.sc-move-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border2); background: #fff;
  font-size: 13px; cursor: pointer; color: var(--text3);
  display: flex; align-items: center; justify-content: center;
}
.sc-move-btn:active { background: #f0f0f0; }
.sc-move-btn:disabled { opacity: .25; cursor: default; }
.sc-del-icon {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid rgba(231,76,60,.25); background: #fff;
  font-size: 13px; cursor: pointer; color: #e74c3c;
  display: flex; align-items: center; justify-content: center;
  margin-left: 8px;
}
.sc-del-icon:hover { background: #fdf2f2; border-color: rgba(231,76,60,.40); }
.sc-del-icon:active { background: #fce8e6; }

/* 添加和声按钮 */
.sc-harmony-btn {
  padding: 2px 8px; border-radius: 6px;
  border: 1px solid rgba(155,89,182,.3); background: #fff;
  font-size: 11px; cursor: pointer; color: #9b59b6;
  display: flex; align-items: center; gap: 2px;
  white-space: nowrap; margin-right: auto;
}
.sc-harmony-btn:hover { background: #faf5ff; border-color: rgba(155,89,182,.5); }
.sc-harmony-btn:active { background: #f3e8ff; }

/* 添加段落按钮 */
.add-section-btn {
  display: block; width: calc(100% - 28px); margin: 0 14px 14px;
  padding: 10px 0; border-radius: 8px;
  background: #fff; color: var(--accent);
  border: 1px dashed rgba(255,71,87,.35);
  font-size: 13px; font-weight: 500; cursor: pointer;
  text-align: center;
}
.add-section-btn:active { background: rgba(255,71,87,.06); }

/* ===== 段落标签选择弹窗 ===== */
.para-tag-sheet {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  align-self: flex-start;
  margin-top: 56px;
  border-radius: 16px;
  max-height: calc(100vh - 80px);
}
.para-tag-search-wrap { margin-bottom: 10px; flex-shrink: 0; }
.para-tag-opts-wrap {
  flex: 1; overflow-y: auto; min-height: 0;
}
.para-tag-opts {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.para-tag-opt {
  padding: 7px 14px; border-radius: 999px;
  background: #f8f9fa; border: 1px solid var(--border2);
  font-size: 13px; color: var(--text3); cursor: pointer;
  white-space: nowrap; user-select: none;
  transition: all .15s;
}
.para-tag-opt:active { background: #eee; }
.para-tag-opt.selected {
  background: #fff5f6; border-color: var(--accent); color: var(--accent);
  font-weight: 600;
}

/* ===== Suno 歌词预览弹窗 ===== */
.suno-preview-sheet {
  max-width: 500px;
}
.suno-preview-body {
  max-height: 55vh; overflow-y: auto; margin-bottom: 14px;
}
.suno-preview-code {
  background: #fafafa; border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px;
  font-family: 'SF Mono','Menlo','Consolas',monospace;
  font-size: 13px; line-height: 1.85;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
  margin: 0;
}

/* ===== 添加和声弹窗 ===== */
#harmonyModal { align-items: center; }
.harmony-modal-sheet {
  max-width: 400px; padding-bottom: 14px;
  border-radius: 16px; margin: auto;
  animation: fadeIn .2s ease; align-self: center;
}
.harmony-body {
  padding: 0 0 14px;
}
.harmony-label {
  display: block; font-size: 13px; color: var(--text2);
  margin-bottom: 8px; font-weight: 500;
}
.harmony-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; line-height: 1.7; color: var(--text);
  outline: none; resize: none; font-family: inherit;
}
.harmony-input:focus { border-color: var(--accent); }
.harmony-input::placeholder { color: #ccc; }
.harmony-btns {
  display: flex; justify-content: flex-end; gap: 10px;
}
.harmony-btn {
  padding: 8px 20px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.harmony-btn.cancel {
  background: #f5f5f5; color: var(--text2);
}
.harmony-btn.cancel:hover { background: #eee; }
.harmony-btn.confirm {
  background: var(--accent); color: #fff;
}
.harmony-btn.confirm:hover { background: #e03e4d; }

/* ===== 歌词查看弹窗 ===== */
.lyric-sheet {
  max-width: 550px;
  /* 靠顶部显示：覆盖 .modal-sheet 的底部弹出样式 */
  align-self: flex-start;
  margin-top: 5vh;
  max-height: 85vh;
  border-radius: 0 0 20px 20px;
  animation: sheetDown .3s ease;
}
@keyframes sheetDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.lyric-tags-section {
  margin-bottom: 12px; padding: 10px 12px;
  background: #fffbf0; border-radius: 8px;
  border: 1px solid #f0e6d0;
}
.lyric-tags-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  /* 默认最多展示 2 行，超出隐藏（由 JS 检测并显示"展开"） */
  max-height: 52px;
  overflow: hidden;
  transition: max-height .2s ease;
}
.lyric-tags-row.expanded {
  max-height: none;
  overflow: visible;
}
.lyric-tag-badge {
  display: inline-block; padding: 3px 10px;
  font-size: 12px; color: #e67e22; background: rgba(230,126,34,.1);
  border-radius: 12px; font-weight: 500;
}
.lyric-tags-full {
  margin-top: 8px; padding: 8px 10px;
  font-size: 12px; color: var(--text3); line-height: 1.7;
  background: rgba(0,0,0,.03); border-radius: 6px;
  white-space: pre-wrap; word-break: break-word;
  max-height: 100px; overflow-y: auto;
}
.lyric-tags-toggle {
  margin-top: 6px; padding: 3px 0; font-size: 11px;
  color: var(--accent); background: none; border: none;
  cursor: pointer;
}
.lyric-preview-body {
  max-height: 50vh; overflow-y: auto; margin-bottom: 14px;
}
.lyric-preview-code {
  background: #fafafa; border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px;
  font-size: 14px; line-height: 2;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
  margin: 0; font-family: inherit;
}

/* ===== 逐句同步歌词 ===== */
.lyric-sync-box {
  background: #fafafa; border: 1px solid var(--border);
  border-radius: 8px; padding: 16px 18px;
  font-size: 14px; line-height: 2;
  color: var(--text); max-height: 50vh; overflow-y: auto;
}
.lyric-line {
  padding: 4px 8px; margin: 2px 0; border-radius: 6px;
  color: var(--text2); transition: color .2s, transform .2s, background .2s;
  white-space: pre-wrap; word-break: break-word;
}
.lyric-line-tag {
  font-size: 12px; color: var(--text3); font-weight: 600;
  margin-top: 10px; letter-spacing: 1px;
}
/* 完整歌词全文（歌词列表"查看"弹窗） */
.lyric-full {
  font-size: 14px; line-height: 2; color: var(--text);
  white-space: normal; word-break: break-word;
}
.lyric-line.active {
  color: var(--accent); font-weight: 700; font-size: 15px;
  background: rgba(230,126,34,.08); transform: scale(1.02);
}

/* ===== 段落讲解弹窗 ===== */
.help-modal-sheet {
  max-height: 80vh; display: flex; flex-direction: column;
  padding-bottom: 14px; overflow: hidden;
  align-self: flex-start; margin-top: 48px;
}
.help-tabs {
  display: flex; gap: 0; margin: 0 0 12px;
  background: var(--border); border-radius: 8px; padding: 3px;
}
.help-tab-btn {
  flex: 1; padding: 8px 0; border-radius: 6px;
  border: none; background: transparent;
  color: var(--text2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .2s;
}
.help-tab-btn.active { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.help-panel { display: none; }
.help-panel.active { display: block; overflow-y: auto; flex: 1; min-height: 0; }

/* 示例 */
.help-ex-block { margin-bottom: 12px; }
.help-ex-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.help-ex-code {
  background: #f8f9fa; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; margin: 0;
  font-size: 12px; line-height: 1.9; color: #666;
  white-space: pre-wrap; word-break: break-word;
}
.help-ex-code b { color: var(--accent); font-weight: 600; }

/* 段落讲解列表 */
.help-sec-list { display: flex; flex-direction: column; gap: 8px; }
.help-sec-item {
  background: #f8f9fa; border-radius: 8px; padding: 10px 14px;
}
.help-sec-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.help-sec-name code {
  font-size: 11px; color: var(--accent);
  background: rgba(255,71,87,.08);
  padding: 1px 6px; border-radius: 4px; margin-left: 4px;
  font-weight: 500;
}
.help-sec-desc { font-size: 12px; color: var(--text3); line-height: 1.7; }

/* ===== 音豆卡片 ===== */
.coin-card {
  margin: 12px 14px 0;
  padding: 16px 16px 14px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.coin-balance {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.coin-label { font-size: 13px; color: var(--text2); }
.coin-value {
  display: flex; align-items: center; gap: 4px;
  font-size: 28px; font-weight: 700; color: var(--accent);
}
.coin-value .coin-icon {
  display: inline-flex; align-items: center; justify-content: center;
}
.coin-value .coin-icon svg { display: block; }
.coin-recharge-btn {
  margin-left: 12px; padding: 6px 16px;
  background: var(--accent); color: #fff; border: none; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ===== 充值弹窗 ===== */
.recharge-sheet { padding-bottom: calc(var(--tab-height, 0px) + 8px); }
.recharge-options { margin-top: 8px; }
.recharge-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: transform .1s;
}
.recharge-item:active { transform: scale(.98); }
.ri-main { flex: 1; min-width: 0; }
.ri-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ri-detail { font-size: 12px; color: var(--text2); margin-top: 3px; line-height: 1.5; }
.ri-right { text-align: right; margin-left: 12px; flex-shrink: 0; }
.ri-coin { font-size: 15px; font-weight: 700; color: var(--accent); }
.ri-price { font-size: 13px; color: var(--text2); margin-top: 3px; }

/* ===== 我的订单 ===== */
.orders-sheet { padding-bottom: calc(var(--tab-height, 0px) + 8px); }
.orders-list { margin-top: 8px; }
.order-item {
  padding: 12px 14px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.oi-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.oi-pkg { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; }
.oi-pkg-icon { margin-right: 6px; font-size: 15px; display: inline-flex; align-items: center; }
.oi-status { font-size: 13px; font-weight: 600; }
.oi-row { font-size: 12px; color: var(--text2); margin-top: 3px; line-height: 1.5; }
.oi-amt { color: var(--accent); font-weight: 600; }
.oi-no { color: var(--text3); font-size: 11px; word-break: break-all; }
.coin-stats {
  display: flex; justify-content: space-around; margin-top: 12px;
}
.coin-stat { text-align: center; }
.coin-stat span { font-size: 18px; font-weight: 600; color: var(--text); }
.stat-label { font-size: 11px; color: var(--text3); margin-top: 2px; }

