:root {
  /* 蓝绿主色：薄荷绿 + 冰川蓝，做清新基调 */
  --mint: #c6dead;
  --mint-deep: #6f9b87;
  --mint-pale: #e8f1de;
  --glacier: #added9;
  --glacier-deep: #4d8b9a;
  --glacier-pale: #e0f0ef;
  --teal-ink: #1f4f54;
  --teal-deep: #2f6f72;

  /* 中性 */
  --bg: #eaf3ee;
  --bg-2: #dceee7;
  --panel: #ffffff;
  --panel-2: #f4faf6;
  --ink: var(--teal-ink);
  --ink-soft: #3c6266;
  --muted: #759098;
  --line: #d9eae3;
  --line-strong: #b8d6ce;

  /* 兼容旧变量名，避免遗漏样式失色 */
  --brand: var(--glacier-deep);
  --brand-deep: var(--teal-deep);
  --brand-soft: var(--glacier);
  --brand-pale: var(--glacier-pale);
  --accent: var(--mint);
  --accent-2: var(--mint-deep);
  --gold: #c9a972;
  --cool-line: var(--line);
  --cool-pale: var(--mint-pale);

  --danger: #b75a55;
  --shadow: 0 22px 50px rgba(47, 111, 114, 0.14);
  --shadow-lift: 0 28px 60px rgba(47, 111, 114, 0.20);
  --radius: 22px;
  --radius-sm: 14px;

  --grad-rose: linear-gradient(135deg, var(--glacier-deep) 0%, var(--mint-deep) 100%);
  --grad-pale: linear-gradient(135deg, #f4faf6 0%, #dceee7 100%);
  --grad-warm: linear-gradient(135deg, var(--glacier-pale) 0%, var(--mint-pale) 100%);
  --grad-cool: linear-gradient(135deg, var(--glacier) 0%, var(--mint) 100%);
  --grad-cool-deep: linear-gradient(135deg, var(--glacier-deep) 0%, var(--mint-deep) 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;

  background-color: #f1f8f3;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(173, 222, 217, 0.42), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(198, 222, 173, 0.38), transparent 30%),
    radial-gradient(circle at 8% 92%, rgba(173, 222, 217, 0.30), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(198, 222, 173, 0.28), transparent 30%),
    radial-gradient(circle at 1px 1px, rgba(47, 111, 114, 0.06) 1px, transparent 0),
    linear-gradient(160deg, rgba(255, 255, 255, 0.55) 0%, transparent 40%),
    linear-gradient(135deg, #f3faf5 0%, var(--bg) 60%, var(--bg-2) 100%);
  background-size:
    auto,
    auto,
    auto,
    auto,
    22px 22px,
    auto,
    auto;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(45deg, rgba(77, 139, 154, 0.03) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, rgba(111, 155, 135, 0.03) 0 1px, transparent 1px 14px);
  mix-blend-mode: multiply;
  opacity: 0.7;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 22px;
  padding: 6px 4px 6px;
}

.brand-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 36%, #ffffff 0%, var(--mint-pale) 55%, var(--mint) 100%);
  border: 1px solid rgba(77, 139, 154, 0.22);
  box-shadow: 0 14px 32px rgba(77, 139, 154, 0.22), inset 0 0 24px rgba(255, 255, 255, 0.55);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 70%, var(--teal-deep) 0%, var(--glacier-deep) 35%, transparent 60%),
    radial-gradient(circle at 70% 32%, rgba(255, 255, 255, 0.85), transparent 38%);
  filter: blur(0.4px);
}

.brand-mark::after {
  content: "鲸";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  color: #f3faf5;
  letter-spacing: 0;
  text-shadow: 0 2px 6px rgba(31, 79, 84, 0.42);
}

.brand-text { display: grid; }

.eyebrow {
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand), transparent);
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 850;
  color: var(--ink);
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--glacier-deep) 50%, var(--mint-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub {
  margin: 10px 0 0;
  color: var(--ink-soft);
  max-width: 860px;
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 600;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glacier);
  box-shadow: 0 0 0 4px rgba(173, 222, 217, 0.32);
}

.bar-actions, .row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bar-actions {
  justify-content: flex-end;
  padding-bottom: 8px;
  position: relative;
}

.history-toggle-wrap {
  position: relative;
}

.history-toggle-wrap #historyToggle.is-open {
  background: var(--grad-rose);
  color: white;
  border-color: transparent;
  box-shadow: 0 14px 32px rgba(196, 69, 105, 0.32);
}

.history-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, 80vw);
  background: rgba(255, 250, 250, 0.98);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
  padding: 16px;
  z-index: 40;
  backdrop-filter: blur(14px);
}

.history-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 28px;
  width: 14px;
  height: 14px;
  background: rgba(255, 250, 250, 0.98);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

.history-popover[hidden] {
  display: none;
}

.history-popover-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.history-popover-head strong {
  font-size: 14px;
  color: var(--brand-deep);
  letter-spacing: .04em;
}

.history-popover-head .hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.history-popover .history-list {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 750;
  font-size: 13px;
  letter-spacing: .04em;
  cursor: pointer;
  background: var(--grad-rose);
  color: white;
  box-shadow: 0 12px 28px rgba(196, 69, 105, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 16px 32px rgba(196, 69, 105, 0.34);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn.alt {
  background: rgba(255, 255, 255, 0.85);
  color: var(--brand-deep);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 18px rgba(196, 69, 105, 0.10);
}

.btn.alt:hover:not(:disabled) {
  background: rgba(255, 246, 244, 1);
  border-color: var(--brand-soft);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.6);
}

.grid {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 0.75fr;
  gap: 16px;
  align-items: start;
}

.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(14px);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--glacier-deep) 0%, var(--mint-deep) 100%);
  opacity: 0.9;
  border-radius: var(--radius) var(--radius) 0 0;
}

.grid > .card:nth-child(1)::before {
  background: linear-gradient(90deg, var(--teal-deep) 0%, var(--glacier-deep) 60%, var(--glacier) 100%);
}

.grid > .card:nth-child(2)::before {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 4px, transparent 4px 8px),
    linear-gradient(90deg, var(--glacier-deep) 0%, var(--mint-deep) 50%, var(--mint) 100%);
  height: 4px;
}

.right-rail .card::before,
.right-rail .big-score::before {
  background:
    radial-gradient(circle at 4px 50%, rgba(255, 255, 255, 0.55) 1.2px, transparent 1.6px),
    linear-gradient(90deg, var(--mint-deep) 0%, var(--glacier-deep) 60%, var(--teal-deep) 100%);
  background-size: 8px 100%, 100% 100%;
  height: 4px;
}

.card-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background:
    repeating-linear-gradient(180deg, rgba(77, 139, 154, 0.04) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, rgba(224, 240, 239, 0.42) 0%, rgba(255, 255, 255, 0) 100%);
}

.card-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-head h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--grad-cool-deep);
}

.card-body { padding: 20px; }
.stack { display: grid; gap: 14px; }

label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 7px;
  letter-spacing: .04em;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 252, 251, 0.85);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font: inherit;
  font-size: 13px;
  outline: none;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:hover, textarea:hover, select:hover {
  border-color: var(--line-strong);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--brand-soft);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(241, 163, 183, 0.22);
}

textarea { min-height: 88px; line-height: 1.6; }
.mini-input { margin-top: 8px; font-size: 13px; }

.row2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.row3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.row4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 252, 251, 0.85);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.choice:hover {
  border-color: var(--brand-soft);
  background: rgba(253, 224, 230, 0.5);
}

.choice:has(input:checked),
.choice.is-checked {
  border-color: var(--brand);
  background: var(--brand-pale);
  color: var(--brand-deep);
}

.choice input {
  width: auto;
  accent-color: var(--brand);
}

.notice {
  background: rgba(224, 240, 239, 0.55);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 11px 13px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.import-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(77, 139, 154, 0.22);
  border-radius: 18px;
  background:
    repeating-linear-gradient(45deg, rgba(173, 222, 217, 0.10) 0 6px, transparent 6px 12px),
    linear-gradient(135deg, var(--mint-pale) 0%, var(--glacier-pale) 100%);
  position: relative;
}

.import-panel::before {
  content: "导入";
  position: absolute;
  top: -10px;
  left: 16px;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 800;
  color: var(--teal-deep);
  background: var(--panel);
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.import-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.import-result[hidden] {
  display: none;
}

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 18px 0;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(180deg, rgba(77, 139, 154, 0.04) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, rgba(224, 240, 239, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
}

.tab-btn {
  border: 0;
  background: transparent;
  padding: 14px 12px 12px;
  font-weight: 800;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
  letter-spacing: .04em;
}

.tab-btn:hover {
  color: var(--brand);
}

.tab-btn.active {
  color: var(--brand-deep);
  border-bottom-color: var(--brand);
}

.tab-panel { display: none; padding: 20px; }
.tab-panel.active { display: block; }

.output-grid { display: grid; gap: 14px; }



.output-box {
  border: 1px solid var(--line);
  background: rgba(255, 252, 251, 0.85);
  border-radius: 18px;
  padding: 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.output-box:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 22px rgba(196, 69, 105, 0.08);
}

.output-box h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  letter-spacing: .03em;
}

.brief-box {
  background:
    repeating-linear-gradient(45deg, rgba(173, 222, 217, 0.10) 0 6px, transparent 6px 12px),
    linear-gradient(135deg, var(--mint-pale) 0%, var(--glacier-pale) 100%);
  border: 1px solid var(--line-strong);
}

.brief-box h3 {
  align-items: center;
}

.brief-box h3 > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brief-actions {
  display: flex;
  gap: 6px;
}

.brief-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.brief-text {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  letter-spacing: .02em;
  min-height: 44px;
}

.brief-text.is-empty {
  color: var(--muted);
  font-style: italic;
  font-size: 13px;
}

.lyrics-viewer {
  padding: 0;
  overflow: hidden;
}

.lyrics-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(244, 250, 246, 0.96), rgba(224, 240, 239, 0.62));
}

.lyrics-toolbar h3 {
  margin: 0 0 10px;
}

.count-tag {
  display: inline-flex;
  margin-left: 8px;
  vertical-align: middle;
}

.lyrics-switch {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.7);
}

.lyrics-view-btn {
  border: 0;
  border-radius: 10px;
  padding: 7px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: color 0.18s ease, background 0.18s ease;
}

.lyrics-view-btn:hover {
  color: var(--brand);
}

.lyrics-view-btn.active {
  color: white;
  background: var(--grad-rose);
  box-shadow: 0 4px 12px rgba(196, 69, 105, 0.28);
}

.lyrics-actions {
  flex: 0 0 auto;
}

.lyrics-actions .btn {
  min-height: 36px;
  padding: 8px 14px;
}

.lyrics-pane {
  padding: 14px 16px 16px;
}

.lyrics-pane[hidden] {
  display: none;
}

.tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--brand-pale);
  color: var(--brand-deep);
  font-weight: 800;
  letter-spacing: .04em;
}

.right-rail .tag {
  background: var(--cool-pale);
  color: var(--glacier-deep);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 13px;
  color: var(--ink-soft);
  font-family: inherit;
}

.lyrics {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 6px, transparent 6px 14px),
    linear-gradient(160deg, var(--teal-ink) 0%, var(--teal-deep) 100%);
  color: #e8f4f0;
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.55;
  white-space: pre-wrap;
  font-size: 13.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.compact-lyrics {
  max-height: 460px;
  overflow-y: auto;
}

.lyric-section {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.lyric-section:last-child {
  margin-bottom: 0;
}

.lyric-section-label {
  color: var(--mint);
  font-weight: 800;
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lyric-line-btn {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1.55;
  padding: 3px 8px;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lyric-line-btn:hover,
.lyric-line-btn.selected {
  background: rgba(232, 244, 240, 0.12);
  border-color: rgba(173, 222, 217, 0.35);
}

.refine-box textarea {
  min-height: 70px;
  margin: 10px 0;
}

.selected-line {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--brand-pale);
  color: var(--ink);
  line-height: 1.7;
  padding: 11px 13px;
  font-size: 13px;
}

.candidate-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.variant-list {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
}

.variant-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 252, 251, 0.9), rgba(253, 224, 230, 0.45));
  padding: 14px;
}

.variant-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.variant-head strong {
  color: var(--ink);
  line-height: 1.45;
}

.variant-item p {
  margin: 7px 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.variant-item pre {
  background: linear-gradient(160deg, var(--teal-ink) 0%, var(--teal-deep) 100%);
  color: #e8f4f0;
  border-radius: 14px;
  padding: 11px 13px;
  margin: 8px 0;
}

.candidate-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 251, 0.85);
  padding: 12px 14px;
}

.candidate-item strong {
  display: block;
  color: var(--ink);
  line-height: 1.7;
}

.candidate-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.right-rail .status-item, .right-rail .rule-line, .right-rail .history-item {
  background: rgba(236, 246, 240, 0.55);
  border-color: var(--cool-line);
}

.right-rail .status-item strong {
  color: var(--glacier-deep);
}

.right-rail .rule-line span {
  color: var(--mint-deep);
}

.right-rail .history-item:hover {
  border-color: var(--glacier);
  background: var(--cool-pale);
}

.right-rail .card-head h2::before {
  background: var(--grad-cool-deep);
}

.big-score {
  position: relative;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, rgba(255, 252, 251, 0.95) 0%, var(--cool-pale) 100%);
  border: 1px solid var(--cool-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.big-score::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--glacier-deep) 0%, var(--mint-deep) 50%, var(--brand) 100%);
}

.big-score h2 {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
}

.score {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  margin: 10px 0 6px;
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--glacier-deep) 50%, var(--mint-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.result-owner {
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
  padding: 11px 13px;
  border: 1px solid var(--cool-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.result-owner strong {
  color: var(--glacier-deep);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.result-owner span {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.result-owner.mismatch {
  border-color: rgba(183, 90, 85, 0.42);
  background: #fff7f4;
}

.result-owner.mismatch strong {
  color: var(--danger);
}

.mismatch-notice {
  margin-bottom: 10px;
  border-color: rgba(183, 90, 85, 0.5);
  background: #fff7f4;
  color: #8c3f3a;
  font-weight: 750;
  line-height: 1.6;
}

.status-list, .rule-card, .history-list {
  display: grid;
  gap: 8px;
}

.history-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.status-item, .rule-line, .history-item {
  background: rgba(255, 252, 251, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.status-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13.5px;
  color: var(--brand-deep);
}

.rule-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.rule-line strong {
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
}

.rule-line span {
  color: var(--brand);
  font-weight: 800;
  text-align: right;
  font-size: 12.5px;
}

.history-item {
  cursor: pointer;
  padding: 11px 13px;
}

.history-item strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
  color: var(--ink);
  font-size: 13px;
}

.history-item span {
  color: var(--muted);
  font-size: 11.5px;
}

.history-item:hover {
  border-color: var(--brand-soft);
  background: var(--brand-pale);
  transform: translateY(-1px);
}

.good { color: #4d8b6f; font-weight: 800; }
.warn { color: var(--brand); font-weight: 800; }
.danger { color: var(--danger); font-weight: 800; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 18px 0 0;
  letter-spacing: .06em;
}

.footer::before {
  content: "～  ";
  color: var(--mint-deep);
}

@media (max-width: 1280px) {
  .grid { grid-template-columns: 1fr; }
  .right-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .brand-block { gap: 14px; }
  .brand-mark { width: 56px; height: 56px; }
  .row2, .row3, .row4, .right-rail, .choice-grid, .import-upload, .candidate-item { grid-template-columns: 1fr; }
  .variant-head { align-items: stretch; flex-direction: column; }
  .card-head, .tabs { padding-left: 14px; padding-right: 14px; }
  .lyrics-toolbar { flex-direction: column; }
  .lyrics-actions { width: 100%; }
  .lyrics-actions .btn { width: 100%; }
}

/* ============ 登录遮罩 ============ */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-pale, linear-gradient(135deg, #f4faf6, #dceee7));
  padding: 20px;
}
.login-overlay[hidden] { display: none; }
.login-card {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(47, 111, 114, 0.15);
  text-align: center;
}
.login-brand {
  font-size: 13px;
  letter-spacing: 6px;
  color: #4d8b9a;
  margin-bottom: 12px;
}
.login-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #1f4f54;
  letter-spacing: -0.02em;
}
.login-hint {
  font-size: 13px;
  color: #759098;
  margin: 0 0 24px;
  line-height: 1.6;
}
.login-card input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #d9eae3;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  margin-bottom: 12px;
}
.login-card input[type="password"]:focus { border-color: #4d8b9a; }
.login-card .btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}
.login-notice {
  margin-top: 14px;
  min-height: 18px;
  font-size: 12px;
  color: #d9534f;
}

/* ============ 导入客户素材弹窗 ============ */
.import-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.import-modal[hidden] { display: none; }
.import-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(31, 79, 84, 0.35);
}
.import-modal-body {
  position: relative;
  width: min(560px, calc(100% - 40px));
  max-height: calc(100vh - 80px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(47, 111, 114, 0.28);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.import-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.import-modal-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink, #1f4f54);
}
.modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #759098;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
}
.import-modal-hint {
  margin: 0;
  font-size: 13px;
  color: #3c6266;
  line-height: 1.6;
}
#importJsonInput {
  width: 100%;
  min-height: 220px;
  border: 1.5px solid #d9eae3;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: -apple-system, monospace;
  font-size: 13px;
  color: #1f4f54;
  resize: vertical;
  outline: none;
}
#importJsonInput:focus { border-color: #4d8b9a; }
.import-modal-notice {
  font-size: 12px;
  min-height: 18px;
  color: #b56b1f;
}
.import-modal-notice.success { color: #6f9b87; }
.import-modal-notice.error { color: #d9534f; }
.import-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
