:root {
  --ink: #302b28;
  --muted: #726b65;
  --cream: #fffaf0;
  --paper: #fffdf8;
  --sky: #cfeaf0;
  --sky-deep: #9bcfd9;
  --yellow: #f3cd61;
  --gold: #dba943;
  --mint: #badfd2;
  --coral: #ec8b73;
  --line: rgba(48, 43, 40, 0.14);
  --shadow: 0 18px 50px rgba(64, 84, 84, 0.12);

  /* 增强版 token */
  --paper-soft: #f8f5ee;
  --green: #3f7d5c;
  --green-bg: #e4f2e8;
  --amber: #9c713a;
  --amber-bg: #fdf0cf;
  --coral-deep: #b04a36;
  --coral-bg: #ffe4dc;
  --focus: rgba(174, 110, 53, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.hero-shell {
  min-height: 700px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 77% 43%, rgba(255, 250, 232, 0.95) 0 16%, transparent 16.3%),
    radial-gradient(circle at 9% 18%, rgba(255, 255, 255, 0.52) 0 3px, transparent 4px),
    var(--sky);
  border-bottom: 1px solid rgba(48, 43, 40, 0.09);
}
.hero-shell::after {
  content: "";
  position: absolute;
  left: -4%; right: -4%; bottom: -56px;
  height: 110px;
  background: var(--cream);
  border-radius: 50% 50% 0 0 / 90% 90% 0 0;
}
/* 统一内容容器：所有主区块共用一个居中宽度，避免各区块自行设宽导致偏左 */
.topbar, .hero, .library-section, .pivot-section {
  width: min(1180px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .05em; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  height: 35px;
  padding: 0 11px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  font-family: Georgia, serif;
  font-size: 14px;
  letter-spacing: .12em;
  background: rgba(255, 253, 248, .45);
}
.hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 54px;
  position: relative;
  z-index: 1;
  padding-bottom: 62px;
}
.eyebrow {
  margin: 0 0 16px;
  font: 700 12.5px/1.2 Georgia, serif;
  letter-spacing: .22em;
  color: #6b6159;
}
.hero h1 {
  margin: 0;
  max-width: 660px;
  font-family: "STKaiti", "KaiTi", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  font-size: clamp(48px, 6.4vw, 84px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.04em;
}
.hero h1 em { color: #ae6e35; font-style: normal; position: relative; }
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2%; right: -3%; bottom: 4px;
  height: 8px;
  border-bottom: 3px solid rgba(174, 110, 53, .55);
  border-radius: 50%;
}
.hero-note { max-width: 545px; margin: 28px 0; color: #5f5a56; line-height: 1.8; font-size: 16px; }
.search-box {
  width: min(540px, 100%);
  height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px 0 20px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 7px 7px 0 rgba(48, 43, 40, .12);
}
.search-icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--ink); }
.search-icon--lg { width: 50px; height: 50px; color: var(--gold); stroke-width: 1.6; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.search-box input::placeholder { color: #756c65; }
.search-box button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #ece7de; cursor: pointer; font-size: 20px; }

.mascot-scene { height: 440px; position: relative; isolation: isolate; }
.mascot-scene::before {
  content: "";
  position: absolute;
  width: 410px; height: 410px;
  left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff5d8;
  border: 1px dashed rgba(48, 43, 40, .2);
}
.cat { position: absolute; width: 170px; height: 150px; border-radius: 48% 48% 43% 43%; z-index: 2; }
.cat-black { left: 60px; top: 132px; background: #332f2d; transform: rotate(-5deg); }
.cat-gold { right: 45px; top: 155px; background: #d5a956; transform: rotate(7deg); box-shadow: inset 0 -26px 0 rgba(255,255,255,.18); }
.cat .ear { position: absolute; width: 72px; height: 78px; top: -38px; background: inherit; clip-path: polygon(50% 0, 100% 100%, 0 82%); }
.cat .ear::after { content: ""; position: absolute; inset: 18px 19px 16px; background: #d98b7f; opacity: .75; clip-path: polygon(50% 0, 100% 100%, 0 82%); }
.cat .ear.left { left: 2px; transform: rotate(-12deg); }
.cat .ear.right { right: 1px; transform: scaleX(-1) rotate(-12deg); }
.cat .eye { position: absolute; top: 61px; width: 29px; height: 14px; border-bottom: 4px solid currentColor; border-radius: 50%; color: #f5e6a1; }
.cat-gold .eye { color: #493a2d; }
.cat .eye.left { left: 35px; transform: rotate(4deg); }
.cat .eye.right { right: 35px; transform: rotate(-4deg); }
.cat .nose { position: absolute; width: 12px; height: 9px; left: calc(50% - 6px); top: 88px; background: #e79b8c; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.cat .nose::after, .cat .nose::before { content: ""; position: absolute; top: 6px; width: 20px; height: 12px; border-bottom: 2px solid currentColor; border-radius: 50%; color: #b97e71; }
.cat .nose::before { right: 5px; }
.cat .nose::after { left: 5px; }
.fish { position: absolute; z-index: 3; left: calc(50% - 31px); top: 278px; width: 66px; height: 36px; border-radius: 55% 45% 45% 55%; background: var(--yellow); transform: rotate(-8deg); border: 2px solid rgba(48,43,40,.65); }
.fish::before { content: ""; position: absolute; width: 34px; height: 42px; right: -28px; top: -4px; background: var(--yellow); border: 2px solid rgba(48,43,40,.65); clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.fish::after { content: ""; position: absolute; left: 15px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.fish i { position: absolute; left: 11px; right: 10px; top: 17px; border-bottom: 1px dashed rgba(48,43,40,.5); }
.scene-shadow { position: absolute; left: 70px; right: 48px; top: 312px; height: 34px; background: rgba(64, 79, 79, .16); filter: blur(12px); border-radius: 50%; z-index: 0; }
.music-note { position: absolute; z-index: 3; font-family: Georgia, serif; font-weight: 700; color: #ae6e35; }
.note-one { left: 25px; top: 80px; font-size: 34px; transform: rotate(-15deg); }
.note-two { right: 18px; top: 78px; font-size: 42px; transform: rotate(9deg); }

.library-section { padding: 60px 0 100px; }

.song-section { padding-top: 30px; }
.song-panel { padding: 28px; border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
.song-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "tabs filter" "quick quick";
  align-items: center;
  column-gap: 18px;
  row-gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { padding: 10px 13px; border: 1px solid transparent; border-radius: 99px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 700; }
.tabs button:hover { background: #f3eee5; }
.tabs button.active { color: var(--paper); background: var(--ink); }
.tabs-wrap { display: contents; }
.quick-rows {
  grid-area: quick;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 4px 0;
}
.quick-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.quick-chip {
  padding: 6px 11px;
  border: 1px solid rgba(48,43,40,.16);
  border-radius: 99px;
  background: #fff;
  color: #5e5751;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.quick-chip:hover { background: var(--yellow); border-color: transparent; }
.sort-row { display: flex; gap: 6px; min-width: 0; }
.sort-row select { flex: 1; min-width: 0; }
.sort-dir {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(48,43,40,.26);
  border-radius: 10px;
  background: #fff;
  color: #5e5751;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.sort-dir:hover { background: var(--yellow); border-color: transparent; }
.status-filter { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--muted); font-size: 13px; }
.status-filter select {
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(48,43,40,.3);
  border-radius: 11px;
  outline: 0;
}
.status-filter select { padding: 9px 34px 9px 11px; }
.status-filter select:focus { border-color: #9c713a; box-shadow: 0 0 0 3px rgba(219,169,67,.17); }
.result-line { margin: 20px 0 14px; color: var(--muted); font-size: 14px; }
.result-line strong { color: var(--ink); }
.song-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; }
.song-grid li { min-height: 78px; display: flex; align-items: center; gap: 12px; position: relative; padding: 13px 14px; background: #f8f5ee; border: 1px solid transparent; border-radius: 14px; }
.song-grid li:hover { border-color: rgba(48,43,40,.16); background: #fff; }
.song-grid li.restricted { background: linear-gradient(90deg, rgba(205,93,65,.55) 0 3px, transparent 3px), #fff9f7; }
.song-grid li.needs-record-confirmation:not(.restricted) { background: linear-gradient(90deg, rgba(185,133,28,.5) 0 3px, transparent 3px), #fff; }
.song-grid li.has-badges { padding-bottom: 34px; }
.song-number { width: 27px; flex: 0 0 auto; font: italic 12.5px Georgia, serif; color: #756c65; }
.song-copy { min-width: 0; }
.song-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.song-copy small { display: block; margin-top: 5px; color: #756c65; font-size: 12.5px; }
.song-badges { position: absolute; left: 53px; right: 10px; bottom: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.status-badge { padding: 3px 7px; border-radius: 99px; font-size: 11px; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.restricted-badge { color: #a8412e; background: #ffd9d0; }
.record-badge { color: #765517; background: #f9dfa0; }
.sung-badge { color: #3f7d5c; background: #e4f2e8; }
.load-more { display: block; margin: 28px auto 2px; padding: 12px 22px; border: 1.5px solid var(--ink); border-radius: 99px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 700; }
.load-more:hover { background: var(--yellow); }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-state h3 { margin: 4px 0 8px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--muted); }
footer { padding: 48px 24px 54px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); background: #f6efe2; }
footer p { margin: 0 0 10px; font: 700 17px Georgia, serif; letter-spacing: .18em; color: var(--ink); }
footer p span:nth-child(1) { color: #b48821; } footer p span:nth-child(2) { color: #4a8d83; } footer p span:nth-child(3) { color: #bf5e49; }
footer small { line-height: 1.7; }

.is-hidden { display: none !important; }

@media (max-width: 900px) {
  .hero-shell { min-height: auto; }
  .hero { grid-template-columns: 1fr; gap: 8px; padding-top: 45px; padding-bottom: 98px; }
  .hero-copy { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-note, .search-box { margin-left: auto; margin-right: auto; }
  .mascot-scene { height: 370px; width: min(500px, 100%); margin: 0 auto; }
  .mascot-scene::before { width: 330px; height: 330px; }
  .cat-black { left: 12%; top: 118px; }
  .cat-gold { right: 9%; top: 135px; }
  .fish { top: 260px; }
  .scene-shadow { top: 295px; }
  .song-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar, .hero, .library-section, .pivot-section { width: calc(100% - 28px); }
  .topbar { height: 72px; }
  .brand { font-size: 14px; gap: 8px; }
  .brand-mark { height: 31px; padding: 0 8px; font-size: 11.5px; }
  .hero { padding-top: 26px; padding-bottom: 40px; }
  .hero h1 { font-size: clamp(34px, 11.4vw, 56px); letter-spacing: -.05em; }
  .hero-note { margin: 16px 4px; font-size: 14px; }
  .search-box { height: 56px; }
  .mascot-scene { height: 240px; transform: none; margin-top: 0; margin-bottom: -6px; }
  .mascot-scene::before { width: 240px; height: 240px; }
  .cat { width: 122px; height: 110px; }
  .cat-black { left: 7%; top: 76px; }
  .cat-gold { right: 4%; top: 92px; }
  .cat .ear { width: 58px; height: 62px; top: -30px; }
  .cat .eye { top: 45px; width: 24px; height: 12px; }
  .cat .nose { top: 68px; }
  .fish { top: 196px; width: 52px; height: 28px; }
  .fish::before { width: 27px; height: 33px; right: -22px; }
  .scene-shadow { top: 220px; left: 12%; right: 10%; }
  .note-one { top: 44px; font-size: 26px; }
  .note-two { top: 42px; font-size: 32px; }
  .library-section { padding-top: 30px; }
  .song-panel { padding: 17px 12px; margin-left: -4px; margin-right: -4px; border-radius: 20px; }
  .song-toolbar { align-items: stretch; flex-direction: column; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tabs button { text-align: center; }
  .status-filter { justify-content: space-between; }
  .song-grid { grid-template-columns: 1fr; }
  .song-grid li { min-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* ============================================================
   增强版：曲库检索 / 原唱透视 / 详情卡片
   ============================================================ */


body { -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }

/* 顶部导航 */
.topbar { gap: 20px; }
.brand { gap: 10px; }
.brand-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #6b6159;
}
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a, .topnav button {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.topnav a:hover, .topnav button:hover {
  background: rgba(255, 253, 248, .72);
  border-color: var(--line);
}

/* Hero */
.hero-shell { min-height: 640px; }
.hero { padding-bottom: 48px; }
.hero-note strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.primary-link, .ghost-link {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
}
.primary-link { color: var(--paper); background: var(--ink); box-shadow: 4px 4px 0 rgba(48,43,40,.12); }
.primary-link:hover { background: #5a4d42; transform: translateY(-1px); }
.ghost-link { background: rgba(255,253,248,.55); }
.ghost-link:hover { background: var(--paper); transform: translateY(-1px); }
.hero-hint { margin: 16px 0 0; color: #756d66; font-size: 13px; }
.hero-search { margin-bottom: 0; }

/* 概览指标 */
.overview {
  width: min(1180px, calc(100% - 48px));
  margin: -42px auto 0;
  position: relative;
  z-index: 3;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric-card {
  position: relative;
  padding: 20px 20px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(64,84,84,.08);
  overflow: hidden;
}
.metric-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--gold);
}
.metric-card:nth-child(2)::before { background: var(--sky-deep); }
.metric-card:nth-child(3)::before { background: var(--mint); }
.metric-card--warn::before { background: var(--coral); }
.metric-label { display: block; color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .1em; }
.metric-card strong {
  display: block;
  margin: 8px 0 6px;
  font: 700 clamp(28px, 3.4vw, 38px)/1 Georgia, "PingFang SC", serif;
  letter-spacing: -.02em;
}
.metric-card small { color: #938b83; font-size: 12.5px; line-height: 1.5; }

/* 曲库面板 */
.library-section { padding: 28px 0 26px; }
.song-panel { padding: 26px 26px 30px; }
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
}
.panel-head .eyebrow { margin-bottom: 8px; }
.panel-head h2, .pivot-head h2 {
  margin: 0;
  font: 700 clamp(30px, 3.4vw, 40px)/1.05 "STKaiti", "KaiTi", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  letter-spacing: -.02em;
}
.panel-sub { margin: 9px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.panel-search {
  width: min(370px, 100%);
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid rgba(48,43,40,.28);
  border-radius: 13px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.panel-search:focus-within { border-color: #9c713a; box-shadow: 0 0 0 3px rgba(219,169,67,.17); }
.panel-search .search-icon { width: 18px; height: 18px; color: #6f6760; }
.panel-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.panel-search input::placeholder { color: #756c65; }

.song-toolbar { align-items: center; padding-bottom: 18px; }
.tabs { grid-area: tabs; padding-top: 2px; }
#filter-toggle { grid-area: filter; }

/* 筛选折叠控件 */
.filter-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 11px 0 13px;
  border: 1.5px solid rgba(48,43,40,.55);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf8 0%, #fdf3dc 100%);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(48,43,40,.16), 0 6px 14px rgba(64,84,84,.09);
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.filter-toggle-icon { width: 17px; height: 17px; flex: 0 0 auto; color: var(--amber); opacity: 1; }
.filter-toggle-label { line-height: 1; margin-right: auto; }
.filter-toggle:hover { background: var(--yellow); border-color: rgba(48,43,40,.65); transform: translateY(-1px); box-shadow: 0 4px 0 rgba(48,43,40,.18), 0 9px 18px rgba(64,84,84,.14); }
.filter-toggle:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(48,43,40,.16); }
.filter-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.filter-toggle[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 2px 0 rgba(48,43,40,.22); }
.filter-toggle[aria-expanded="true"] .filter-toggle-icon { color: var(--yellow); opacity: 1; }
.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--coral);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.filter-toggle[aria-expanded="true"] .filter-count { background: var(--yellow); color: var(--ink); }
.filter-caret {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 1px;
  border-radius: 7px;
  background: rgba(48,43,40,.08);
  color: inherit;
  transition: transform .18s ease, background .18s ease;
}
.filter-caret svg { width: 14px; height: 14px; display: block; }
/* 折叠态把箭头做成深色「下拉」实体，并轻微上下提示可点 */
.filter-toggle[aria-expanded="false"] .filter-caret { background: var(--ink); color: var(--paper); box-shadow: 0 1px 2px rgba(48,43,40,.24); }
.filter-toggle[aria-expanded="false"] .filter-caret svg { animation: filter-caret-nudge 2.4s ease-in-out infinite; }
@keyframes filter-caret-nudge { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) {
  .filter-toggle[aria-expanded="false"] .filter-caret svg { animation: none; }
}
.filter-toggle[aria-expanded="true"] .filter-caret { transform: rotate(180deg); background: rgba(255,253,248,.2); }

.filter-panel {
  margin: 0 0 18px;
  padding: 18px 0 4px;
  border-top: 1px dashed var(--line);
  animation: card-rise .2s ease both;
}
.filter-panel[hidden] { display: none; }
.filter-panel .filters { justify-content: flex-start; align-items: flex-end; }
.quick-rows--panel { flex-basis: 100%; margin-top: 2px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px 12px;
}
.mode-switch {
  display: inline-flex;
  padding: 3px;
  background: #f1ece2;
  border-radius: 99px;
}
.mode-switch button {
  padding: 7px 12px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: #6f675f;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.mode-switch button.active { color: var(--paper); background: var(--ink); }
.filter-field { display: grid; gap: 5px; }
.filter-field > span { color: #6f6760; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; }
.filter-field select {
  min-height: 38px;
  padding: 8px 30px 8px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(48,43,40,.26);
  border-radius: 10px;
  outline: 0;
  font-size: 13px;
}
.filter-field select:focus { border-color: #9c713a; box-shadow: 0 0 0 3px rgba(219,169,67,.17); }
.check-field { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; color: #6f675f; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.check-field input { width: 15px; height: 15px; accent-color: var(--ink); }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: -2px 0 16px; }
.active-filters:empty { display: none; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 11px;
  border: 1px solid rgba(48,43,40,.16);
  border-radius: 99px;
  background: #fff;
  color: #5e5751;
  font-size: 12.5px;
}
.filter-chip strong { color: var(--ink); font-weight: 800; }
.filter-chip button { border: 0; background: transparent; color: #756c65; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 1px; }
.filter-chip button:hover { color: var(--coral-deep); }
.clear-filters { margin-left: 2px; padding: 5px 8px; border: 0; background: transparent; color: #9c713a; cursor: pointer; font-size: 12.5px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.records-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.record-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 142px;
  padding: 15px 15px 13px;
  background: var(--paper-soft);
  border: 1px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.record-card:hover {
  background: #fff;
  border-color: rgba(48,43,40,.18);
  box-shadow: 0 8px 20px rgba(64,84,84,.08);
  transform: translateY(-2px);
}
.record-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.record-card.restricted { background: linear-gradient(90deg, rgba(205,93,65,.55) 0 3px, transparent 3px), #fff9f7; }
.record-card.needs-record { background: linear-gradient(90deg, rgba(185,133,28,.5) 0 3px, transparent 3px), #fff; }
.record-card.restricted.needs-record { background: linear-gradient(90deg, rgba(205,93,65,.55) 0 3px, transparent 3px), #fffaf7; }
.record-top { display: flex; align-items: center; gap: 7px; min-height: 18px; }
.record-index { flex: 0 0 auto; min-width: 22px; color: #756c65; font: italic 12.5px Georgia, serif; }
.lib-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(48,43,40,.06);
  color: #6b625a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}
.record-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.record-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 原唱只用于检索，卡面上弱化为低对比元信息；可信度与核实状态保留在 hover 提示里 */
.record-original {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  min-width: 0;
  color: #9a918a;
  font-size: 11.5px;
}
.record-original .label { flex: 0 0 auto; color: #a59c94; font-size: 11px; letter-spacing: .06em; }
.record-original strong,
.record-original .orig-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7d746d; font-weight: 400; }
.record-source { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 5px 0 0; }
.record-source .source-date {
  flex: 0 0 auto;
  color: #6f6760;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.source-kind { color: #6f6760; font-size: 11px; font-weight: 600; }
.source-all { display: block; margin-top: 3px; color: #756c65; font-size: 12px; line-height: 1.5; }
.status-badge.source-badge { background: rgba(74,141,131,.12); color: #3f7d6f; }
.record-source .source-date.latest { color: #8a6b54; }
.status-badge.latest-badge { background: rgba(191,94,73,.12); color: #a8543f; }
.conf-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #c9c1b8; }
.conf-dot.high { background: var(--green); }
.conf-dot.medium { background: var(--gold); }
.conf-dot.low { background: var(--coral); }
.record-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 3px;
  color: #756c65;
  font-size: 12px;
}
.record-foot .link-state { display: inline-flex; align-items: center; gap: 4px; }
.record-foot .link-state.has-link { color: #3f7d6f; font-weight: 700; }
.record-foot .detail-hint { color: #9a9188; font-weight: 600; opacity: 0; transition: opacity .16s ease, color .16s ease; }
.record-card:hover .detail-hint, .record-card:focus-visible .detail-hint { color: #9c713a; opacity: 1; }

/* 原唱透视 */
.pivot-section { padding: 12px 0 24px; }
.pivot-panel { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.pivot-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.pivot-head .eyebrow { margin-bottom: 8px; }
.pivot-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 10px; }
.pivot-search { width: 220px; height: 40px; }
.pivot-note { margin: 16px 0 14px; color: #6f6760; font-size: 12.5px; line-height: 1.6; }
.pivot-table-wrap { overflow: auto; max-height: 640px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pivot-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pivot-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 12px;
  color: #6f6760;
  background: #faf7f0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
}
.pivot-table td { padding: 10px 12px; border-bottom: 1px solid rgba(48,43,40,.07); vertical-align: middle; }
.pivot-table tr:last-child td { border-bottom: 0; }
.pivot-table tbody tr { transition: background .14s ease; }
.pivot-table tbody tr:hover { background: #fcfaf5; }
.col-rank { width: 42px; }
.col-count { width: 78px; }
.col-share { width: 200px; }
.col-lib { width: 58px; text-align: center; }
.col-action { width: 72px; }
.pivot-table th.col-lib { text-align: center; }
.pivot-rank { color: #847b73; font: italic 12.5px Georgia, serif; }
.pivot-name { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.pivot-name button {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.pivot-name button:hover { color: #9c713a; text-decoration: underline; text-underline-offset: 3px; }
.pivot-count { font-weight: 800; color: var(--ink); }
.pivot-lib { text-align: center; color: #776f67; font-variant-numeric: tabular-nums; }
.pivot-lib.zero { color: #c9c1b8; }
.pivot-share { display: flex; align-items: center; gap: 8px; }
.share-track { display: block; flex: 1; height: 6px; min-width: 42px; border-radius: 99px; background: #efe9df; overflow: hidden; }
.share-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--coral)); }
.share-text { flex: 0 0 auto; color: #756c65; font-size: 12px; font-variant-numeric: tabular-nums; }
.pivot-view {
  padding: 5px 9px;
  border: 1px solid rgba(48,43,40,.2);
  border-radius: 99px;
  background: #fff;
  color: #5e5751;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.pivot-view:hover { background: var(--yellow); border-color: transparent; }

/* 详情弹窗 */
dialog.modal {
  width: min(900px, calc(100% - 28px));
  max-width: 900px;
  max-height: calc(100vh - 36px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
dialog.modal::backdrop { background: rgba(48,43,40,.44); backdrop-filter: blur(4px); }
.modal-shell {
  position: relative;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 32px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 26px;
  box-shadow: 12px 14px 0 rgba(48,43,40,.14);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(48,43,40,.22);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: var(--yellow); }
.detail-title {
  max-width: calc(100% - 50px);
  margin: 6px 0 12px;
  font: 700 clamp(30px, 4vw, 44px)/1.15 "STKaiti", "KaiTi", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  letter-spacing: -.02em;
}
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.detail-badges .status-badge { font-size: 11.5px; padding: 4px 9px; }
.detail-badges .lib-chip { font-size: 11.5px; padding: 4px 9px; }
.detail-section { padding: 20px 0; border-top: 1px dashed rgba(48,43,40,.16); }
.detail-section h3 { margin: 0 0 14px; color: #6b6159; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; }
.original-hero { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.original-hero strong { font-family: inherit; font-size: 18px; font-weight: 500; line-height: 1.4; color: #6b625a; }
.confidence-badge { padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.confidence-badge.high { color: var(--green); background: var(--green-bg); }
.confidence-badge.medium { color: var(--amber); background: var(--amber-bg); }
.confidence-badge.low { color: var(--coral-deep); background: var(--coral-bg); }
.confidence-badge.unknown { color: #7a726a; background: #eee9e1; }
/* 详情里的原唱判定信息同样降权，不再与歌名争夺视觉中心 */
.original-hero .confidence-badge { padding: 0; background: transparent; color: #9a918a; font-size: 11px; font-weight: 500; }
/* 原唱仅作检索辅助：标题与名字都要弱于「曲库人」来源信息 */
.detail-section:first-of-type h3 { margin-bottom: 8px; color: #a59c94; font-size: 11.5px; font-weight: 500; letter-spacing: .06em; }
.detail-section:first-of-type .original-hero strong { color: #8c837b; font-size: 13px; font-weight: 400; }
.detail-section:first-of-type .detail-meta { margin-top: 10px; }
.detail-meta { display: grid; gap: 8px; margin: 16px 0 0; }
.detail-meta > div { display: grid; grid-template-columns: 118px 1fr; gap: 12px; }
.detail-meta > div[hidden] { display: none !important; }
.detail-meta dt { color: #756c65; font-size: 12.5px; }
.detail-meta dd { margin: 0; color: #4f4842; font-size: 13.5px; line-height: 1.6; }
.detail-links { display: flex; flex-direction: column; gap: 14px; }
.link-group-title {
  margin: 0 0 7px;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft, #8b8178);
  display: flex;
  align-items: center;
  gap: 8px;
}
.link-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(48, 43, 40, .1);
}
.link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(48,43,40,.16);
  border-radius: 12px;
  background: #fff;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.link-card:hover { background: #fdf8ea; border-color: rgba(48,43,40,.3); transform: translateY(-1px); }
.link-card.is-empty { background: #faf7f0; border-style: dashed; color: #756c65; }
.link-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f3eee5;
  color: #6b6159;
  font: 700 14px Georgia, serif;
}
.link-card.is-empty .link-icon { color: #b6ada4; }
.link-copy { display: grid; gap: 2px; min-width: 0; }
.link-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; }
.link-card.is-empty .link-copy strong { color: #756c65; }
.link-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #756c65; font-size: 11.5px; }
.link-arrow { margin-left: auto; color: #756c65; font-size: 14px; }
.detail-extra { display: grid; gap: 9px; margin: 0; }
.detail-extra > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.detail-extra dt { color: #756c65; font-size: 12.5px; }
.detail-extra dd { margin: 0; color: #5c554e; font-size: 12.5px; line-height: 1.7; word-break: break-word; }
.extra-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(48,43,40,.16);
  border-radius: 99px;
  background: #fff;
  color: #3f7d6f;
  font-size: 12.5px;
  font-weight: 700;
}
.extra-link:hover { background: #fdf8ea; border-color: rgba(48,43,40,.3); }

/* 详情「更多信息」：完整翻唱记录 */
.record-log-row dd { min-width: 0; }
.record-log {
  display: grid;
  gap: 6px;
  max-height: 280px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.record-log li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 4px 8px;
  align-items: start;
  padding: 6px 8px;
  border: 1px solid rgba(48,43,40,.1);
  border-radius: 10px;
  background: #fbf8f1;
}
.log-date { color: #3f7d6f; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-links { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.log-link {
  padding: 2px 7px;
  border: 1px solid rgba(48,43,40,.14);
  border-radius: 99px;
  background: #fff;
  color: #5e5751;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.log-link:hover { background: #fdf8ea; }
.log-link.is-duet { color: #a8543f; background: #fff4e4; border-color: rgba(205,93,65,.2); }
.log-note { grid-column: 2; color: #756c65; font-size: 11.5px; line-height: 1.45; }
.detail-note { margin: 8px 0 0; padding: 13px 14px; border-radius: 12px; background: #f6f0e4; color: #8a7a63; font-size: 12.5px; line-height: 1.7; }

/* 数据说明 */
.guide-shell { width: 100%; }
.guide-lead { margin: 4px 0 8px; color: #5e5751; font-size: 14px; line-height: 1.8; }
.guide-shell code { padding: 1px 5px; border-radius: 5px; color: #7d472c; background: #f5e7cf; font-size: .92em; }
.guide-shell pre { margin: 12px 0; padding: 14px 16px; overflow: auto; border-radius: 12px; background: #f3eee5; color: #4b443d; font-size: 12.5px; line-height: 1.7; }
.guide-shell pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.guide-shell .detail-section p { margin: 8px 0; color: #5e5751; font-size: 13.5px; line-height: 1.75; }
.guide-muted { color: #756c65 !important; font-size: 12.5px !important; }

/* 页脚 */
.footer-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.footer-actions a, .footer-actions button {
  padding: 8px 14px;
  border: 1px solid rgba(48,43,40,.22);
  border-radius: 99px;
  background: rgba(255,253,248,.6);
  color: #5e5751;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
}
.footer-actions a:hover, .footer-actions button:hover { background: #fff; }

/* 加载动画 */
@keyframes card-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.record-card { animation: card-rise .24s ease both; }

/* 响应式 */
@media (max-width: 1020px) {
  .filters { justify-content: flex-start; }
  .song-toolbar { flex-direction: column; }
  .filter-toggle { align-self: flex-end; }
  .records-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pivot-head { flex-direction: column; align-items: stretch; }
  .pivot-controls { justify-content: flex-start; }
  .pivot-search { width: min(320px, 100%); }
}

@media (max-width: 760px) {
  /* 曲库工具栏：单列堆叠，避免曲库切换被筛选区挤压成竖排 */
  .song-toolbar {
    grid-template-columns: 1fr;
    grid-template-areas: "tabs" "filter" "quick";
    row-gap: 10px;
  }
  #filter-toggle { width: 100%; justify-content: space-between; padding: 0 14px; }
  .overview { width: min(100% - 28px, 1180px); margin-top: -28px; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 16px; }
  .panel-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .panel-search { width: 100%; }
  .library-section { padding-top: 22px; }
  .song-panel, .pivot-panel { padding: 19px 15px 22px; border-radius: 20px; }
  .records-grid { grid-template-columns: minmax(0, 1fr); }
  .record-card { min-height: 128px; min-width: 0; }
  .link-grid { grid-template-columns: 1fr; }
  .modal-shell { padding: 23px 18px; border-radius: 20px; }
  .detail-meta > div, .detail-extra > div { grid-template-columns: 88px 1fr; }
  .pivot-table { min-width: 560px; }
  .pivot-table-wrap { max-height: 520px; }
}

@media (max-width: 620px) {
  .brand-text { display: none; }
  .topnav { gap: 0; }
  .topnav a, .topnav button { padding: 7px 9px; font-size: 12.5px; }
  .hero-shell { min-height: auto; }
  .hero { padding-top: 22px; }
  .hero-actions { justify-content: center; }
  .hero-hint { text-align: center; }
  .filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .mode-switch { grid-column: 1 / -1; justify-content: center; }
  .quick-rows--panel { grid-column: 1 / -1; margin-top: 0; }
  .filter-field { min-width: 0; }
  .filter-field select { width: 100%; }
  .check-field { grid-column: 1 / -1; min-height: 30px; }
  .pivot-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .pivot-search { grid-column: 1 / -1; width: 100%; }
  .pivot-table { min-width: 0; }
  .pivot-table th.col-share, .pivot-table td.col-share,
  .pivot-table th.col-lib, .pivot-table td.col-lib { display: none; }
  .pivot-table .pivot-name { min-width: 0; }
  .pivot-table .pivot-name button { white-space: normal; line-height: 1.35; }
  .modal { width: calc(100% - 16px); }
  .modal-shell { padding: 22px 15px; }
  .detail-title { font-size: 31px; }
  .footer-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 520px) {
  /* 详情字段：标签改到值上方，避免「网易云匹配条目」这类长标签被挤成两行 */
  .detail-meta > div, .detail-extra > div { grid-template-columns: 1fr; gap: 2px; }
  .detail-meta dt, .detail-extra dt {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8b8178;
  }
  .detail-meta dd { font-size: 13.5px; }
  .detail-extra > div + div { margin-top: 3px; }
}

@media (max-width: 430px) {
  /* 窄屏下曲风与排序各占一行，避免下拉框被压到只显示一两个字 */
  .filter-field--genre, .filter-field--sort { grid-column: 1 / -1; }
  .filter-field--sort .sort-row select { flex: 1 1 auto; min-width: 0; }
}


/* 详情「更多信息」：逐条展示的来源与时间 */
.source-detail-list { display: flex; flex-wrap: wrap; gap: 6px 9px; }
.source-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid rgba(48,43,40,.12);
  border-radius: 99px;
  background: #f8f5ee;
  font-size: 12.5px;
  line-height: 1.4;
}
.source-time .source-kind { color: #6f6760; font-size: 12.5px; font-weight: 700; }
.source-time .source-date {
  color: #3f7d6f;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 人工核实标识与待核对提示 */
.verified-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #2f6b4f;
  background: #e2f1e7;
  border: 1px solid #bcdcc7;
}

.confidence-badge.verified {
  background: #e2f1e7;
  color: #2f6b4f;
  border-color: #bcdcc7;
}

.detail-conflict {
  color: #a8543f;
}

#detail-conflict-row[hidden] { display: none; }

.cover-badge {
  background: #eaf0f6;
  color: #44617f;
  border: 1px solid #d3e0ec;
}

/* 曲库 / 原唱统计 页面浮动导航 */
.float-nav {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, .92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.float-nav.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.float-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: background .15s ease, color .15s ease;
}
.float-nav a:hover { background: var(--sky); color: var(--ink); }
.float-nav a.is-active { background: var(--ink); color: var(--paper); }
.float-nav .float-top {
  min-width: 62px;
  padding: 6px 9px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.float-nav .float-top:hover { color: var(--ink); }
@media (max-width: 720px) {
  .float-nav {
    right: 10px;
    bottom: 12px;
    flex-direction: row;
    padding: 5px;
  }
  .float-nav a { min-width: 54px; padding: 7px 6px; }
  .float-nav .float-top {
    min-width: 44px;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 8px 8px 0;
  }
}
@media print { .float-nav { display: none; } }

/* ─── 同名折叠预览（preview-fold.html / ?fold=1 专用；正式页不加载这些类）─────── */
.fold-preview-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 9px clamp(14px, 4vw, 28px);
  background: #fff4d8;
  border-bottom: 1px solid rgba(155, 113, 58, .3);
  color: #7a5a25;
  font-size: 12.5px;
  font-weight: 700;
}
.fold-preview-bar.is-off { background: #f2eee6; border-bottom-color: var(--line); color: #6b6159; }
.fold-preview-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(155, 113, 58, .16);
  color: #7a5a25;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
}
.fold-preview-bar.is-off .fold-preview-tag { background: rgba(48, 43, 40, .1); color: #6b6159; }
.fold-preview-bar p { flex: 1 1 260px; margin: 0; font-weight: 600; line-height: 1.55; }
.fold-preview-bar p b { font-weight: 800; }
.fold-preview-bar button {
  flex: 0 0 auto;
  padding: 5px 13px;
  border: 1px solid rgba(155, 113, 58, .42);
  border-radius: 99px;
  background: #fff;
  color: #7a5a25;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.fold-preview-bar button:hover { background: #7a5a25; border-color: #7a5a25; color: #fff; }
.fold-preview-bar.is-off button { border-color: var(--line); color: #4f4842; }
.fold-preview-bar.is-off button:hover { background: #4f4842; border-color: #4f4842; color: #fff; }

/* 卡片：多库 chip + 分库状态行 */
.record-card--fold .record-top { flex-wrap: wrap; row-gap: 4px; }
.record-card--fold .lib-chip { background: rgba(48, 43, 40, .09); }
.fold-lib-states { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: -1px; }
.lib-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6f6760;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.lib-state b { color: #4f4842; font-weight: 800; }
.lib-state::before { content: ""; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: #c9c1b8; }
.lib-state.is-sung { color: #3f7d6f; }
.lib-state.is-sung::before { background: var(--green); }
.lib-state.is-unmatched { color: var(--amber); }
.lib-state.is-unmatched::before { background: var(--gold); }
.lib-state.is-restricted { color: var(--coral-deep); }
.lib-state.is-restricted::before { background: var(--coral); }

/* 详情：共同信息 + 曲库标签页 */
.detail-group { display: block; }
.detail-group[hidden] { display: none; }
.lib-block { padding: 16px 0 4px; border-top: 0; }
.lib-block[hidden], .lib-block:not(.is-active) { display: none; }
.lib-block.is-active { display: block; }
.lib-block-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 13px !important;
  color: var(--ink);
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0 !important;
}
.lib-block-head .lib-chip { padding: 3px 9px; background: rgba(48, 43, 40, .08); font-size: 11.5px; }
.lib-block-note { margin-left: auto; color: #756c65; font-size: 11.5px; font-weight: 600; letter-spacing: 0; }
.lib-block-links { margin-top: 13px; }
.lib-block-links .link-group + .link-group { margin-top: 12px; }
.lib-block .detail-extra { margin: 12px 0 0; }
.fold-raw { color: #756c65; font-size: 12px; letter-spacing: 0; }
.fold-detail-note {
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px dashed rgba(48, 43, 40, .16);
  color: #756c65;
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 620px) {
  .fold-preview-bar { font-size: 12px; }
  .fold-preview-bar p { flex-basis: 100%; }
  .lib-block-note { margin-left: 0; flex-basis: 100%; }
}

/* 折叠补充：未命中当前筛选的库淡显 / 共同原唱小标 */
.lib-chip.is-dim { opacity: .4; }
.lib-state.is-dim { opacity: .45; }
.fold-shared-tag {
  margin-left: 2px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(63, 125, 111, .12);
  color: #3f7d6f;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0;
}
.fold-shared-block .detail-meta { margin-top: 14px; }
.fold-shared-links { margin-top: 14px; }
.fold-shared-links .link-group + .link-group { margin-top: 10px; }

@media (max-width: 620px) {
  .fold-preview-bar { font-size: 11.5px; padding: 7px 12px; gap: 5px 8px; }
  .fold-preview-bar p { flex: 1 1 auto; line-height: 1.5; }
  .fold-preview-bar .fold-preview-more { display: none; }
  .fold-preview-bar button { padding: 4px 10px; font-size: 11.5px; }
  .fold-preview-tag { font-size: 10px; padding: 2px 6px; }
  .lib-block-head { gap: 6px; }
  .lib-block-note { margin-left: 0; flex-basis: 100%; }
}

/* 预览条：状态单独成药丸，窄屏只留「预览版 + 状态 + 开关」一行 */
.fold-preview-state {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(155, 113, 58, .14);
  color: #7a5a25;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.fold-preview-bar.is-off .fold-preview-state { background: rgba(48, 43, 40, .08); color: #6b6159; }
@media (max-width: 620px) {
  .fold-preview-bar { padding: 6px 12px; }
  .fold-preview-bar .fold-preview-text { display: none; }
}
.fold-shared-block .original-hero strong { color: #8c837b; font-size: 13px; font-weight: 400; }
.fold-shared-block .original-hero { gap: 8px; }
.fold-lib-states { font-size: 10.5px; gap: 2px 9px; }
.fold-lib-states .lib-state { font-size: 10.5px; }
@media (max-width: 620px) {
  /* 窄屏里「本库 N 次翻唱」与下方「本库最近翻唱（共 N 次）」重复，隐藏后者更干净 */
  .lib-block-note { display: none; }
}

/* 曲库标签页：吸顶，长记录列表里也能随时换库 */
.lib-tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 12px 0 12px;
  background: var(--paper);
  border-top: 1px dashed rgba(48, 43, 40, .16);
}
.lib-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid rgba(48, 43, 40, .16);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.lib-tab:hover { border-color: rgba(48, 43, 40, .42); }
.lib-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lib-tab.is-active {
  border-color: var(--ink);
  background: #fffdf7;
  box-shadow: 3px 3px 0 rgba(48, 43, 40, .12);
}
.lib-tab-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-tab:not(.is-active) .lib-tab-name { color: #6b625a; }
.lib-tab-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6f6760;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.lib-tab-state::before { content: ""; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: #c9c1b8; }
.lib-tab-state.is-sung { color: #3f7d6f; }
.lib-tab-state.is-sung::before { background: var(--green); }
.lib-tab-state.is-unmatched { color: var(--amber); }
.lib-tab-state.is-unmatched::before { background: var(--gold); }
.lib-tab-state.is-restricted { color: var(--coral-deep); }
.lib-tab-state.is-restricted::before { background: var(--coral); }

@media (max-width: 620px) {
  .lib-tabs { gap: 5px; padding: 10px 0; }
  .lib-tab { padding: 7px 9px; border-radius: 12px; }
  .lib-tab-name { font-size: 12.5px; }
  .lib-tab-state { font-size: 10.5px; }
}
/* 标签上已写明翻唱次数，面板头不再重复；占位链接卡片也不在折叠详情里重复 */
.lib-block .lib-block-note { display: none; }

/* 禁唱标记显示开关：按钮放在筛选面板「演唱状态」下方，只隐藏徽章不改筛选 */
.restricted-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 7px 0 2px;
  padding: 5px 12px;
  border: 1px solid rgba(168, 65, 46, .38);
  border-radius: 99px;
  background: #fff;
  color: #a8412e;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.restricted-toggle:hover { background: #ffd9d0; }
.restricted-toggle.is-on { border-color: rgba(48, 43, 40, .24); background: rgba(48, 43, 40, .07); color: #6b625a; }
.restricted-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
body.hide-restricted .restricted-badge { display: none !important; }
.restricted-toggle--bar {
  margin: 0;
  padding: 4px 10px;
  border-color: rgba(155, 113, 58, .42);
  color: #7a5a25;
  font-size: 11.5px;
}
.restricted-toggle--bar:hover { background: #7a5a25; color: #fff; }
.restricted-toggle--bar.is-on { border-color: rgba(48, 43, 40, .24); background: #fff; color: #6b625a; }
@media (max-width: 620px) {
  .restricted-toggle--bar { padding: 3px 8px; font-size: 11px; }
}

/* 顶部品牌/导航条不在网页展示；锚点跳转由首页按钮与浮动导航承担 */
.topbar { display: none !important; }
.hero { padding-top: 34px; }
@media (max-width: 620px) {
  .hero { padding-top: 36px; }
}

/* 禁唱显示开关独立成「显示设置」行，不再混在筛选条件下拉里 */
.display-settings {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px dashed rgba(48, 43, 40, .16);
}
.display-settings-label {
  color: #6f6760;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .08em;
}
.display-settings-note { color: #8a8178; font-size: 11.5px; font-weight: 600; }
.restricted-toggle--panel {
  margin: 0;
  padding: 4px 11px;
  border-color: rgba(48, 43, 40, .2);
  background: #f1ece2;
  color: #5d554e;
}
.restricted-toggle--panel:hover { background: #e4ddcf; }
.restricted-toggle--panel.is-on { border-color: rgba(48, 43, 40, .16); background: #fff; color: #6b625a; }

/* 曲库 / 按原唱聚合：左右 tab 切换（两个视图不再上下堆叠） */
.view-tabs {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(48, 43, 40, .12);
  border-radius: 16px;
  background: rgba(249, 245, 237, .94);
  box-shadow: 0 10px 28px rgba(48, 43, 40, .08);
  backdrop-filter: blur(12px);
}
.view-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.view-tab svg { width: 18px; height: 18px; flex: 0 0 auto; }
.view-tab small { font-size: 11px; font-weight: 600; opacity: .72; }
.view-tab:hover { background: rgba(48, 43, 40, .05); color: var(--ink); }
.view-tab.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 6px 14px rgba(48, 43, 40, .16);
}
.view-tab.active small { opacity: .82; }
.view-tab:focus-visible { outline: 2px solid #b88636; outline-offset: 2px; }
body.view-library .pivot-section,
body.view-pivot .library-section { display: none !important; }
body.view-library .library-section,
body.view-pivot .pivot-section {
  padding-top: 18px;
  animation: view-slide-in .22s ease both;
}
@keyframes view-slide-in {
  from { opacity: .35; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 620px) {
  .view-tabs { width: calc(100% - 28px); }
  .view-tab { flex-direction: column; gap: 1px; min-height: 50px; padding: 5px 6px; font-size: 13px; }
  .view-tab svg { width: 16px; height: 16px; }
  .view-tab small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  body.view-library .library-section,
  body.view-pivot .pivot-section { animation: none; }
  .view-tab { transition: none; }
}
