:root {
  --paper: #edf3fa;
  --ink: #0f1f33;
  --ink-soft: #3d5a73;
  --ink-faint: #8fa6bd;
  --line: #e2e9f0;
  --accent: #2563eb;
  --radius: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --max: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}

/* 顶栏 */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 15px;
}
.brand { font-weight: 600; letter-spacing: .02em; color: var(--accent); }
.nav a { margin-left: 28px; color: var(--ink-soft); transition: color .15s ease; }
.nav a:hover { color: var(--accent); }
.nav a:first-child { margin-left: 0; }

/* 编辑态 */
.editing [data-edit] {
  outline: none;
  cursor: text;
  border-bottom: 1px dashed var(--accent);
}
.editing [data-edit]:hover { background: rgba(37, 99, 235, .06); }
.editing [data-edit]:focus { background: rgba(37, 99, 235, .1); }
.editing [data-edit]:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-faint);
}
.editing .cover,
.editing .detail-cover { cursor: pointer; }
.editing .cover:hover,
.editing .detail-cover:hover { opacity: .85; }

/* 首屏 */
.hero { padding: 96px 0 40px; }
.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 40em;
}

/* 区块 */
section { padding-top: 96px; }
.label {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}

/* 专辑网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px 28px;
}

.card { cursor: pointer; }
.card .cover {
  aspect-ratio: 1 / 1;
  background-color: #dbe7f4;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius) 0 var(--radius) 0;
  overflow: hidden;
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .name {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  transition: color .15s ease;
}
.card:hover .name { color: var(--accent); }
.card .year {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-faint);
}

.add-card {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius) 0 var(--radius) 0;
  background: none;
  color: var(--ink-faint);
  font-family: inherit;
  font-size: 30px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.add-card:hover { color: var(--accent); border-color: var(--accent); }

/* 关于 */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: start;
}
.about { font-size: 17px; max-width: 34em; color: var(--ink-soft); }
.facts {
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.facts dt {
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 11px;
  margin-top: 20px;
}
.facts dd { margin-top: 4px; }

/* 联系 */
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.contact-link { display: inline-flex; }
.contact-link img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: opacity .15s ease;
}
.contact-link:hover img { opacity: .6; }

.editing .contact { flex-direction: column; align-items: stretch; gap: 0; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.contact-icon {
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px dashed var(--line);
  border-radius: 50%;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 20px;
  transition: border-color .15s ease, color .15s ease;
}
.contact-icon:hover { color: var(--accent); border-color: var(--accent); }
.contact-icon img { width: 100%; height: 100%; object-fit: contain; }
.contact-url {
  flex: 1;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 4px 8px;
}
.contact-remove {
  flex: none;
  border: none;
  background: none;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.contact-remove:hover { color: #d64545; }
.contact-add {
  margin-top: 12px;
  align-self: flex-start;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-faint);
  background: none;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.contact-add:hover { color: var(--accent); border-color: var(--accent); }

/* 详情视图 */
.back {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 48px 0 40px;
}
.back:hover { color: var(--accent); }

.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: end;
}
.detail-cover {
  aspect-ratio: 1 / 1;
  background-color: #dbe7f4;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius) 0 var(--radius) 0;
}
.detail-info h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.detail-meta { margin-top: 12px; color: var(--ink-faint); font-size: 14px; }
.detail-play {
  display: inline-block;
  margin-top: 32px;
  padding: 12px 28px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 14px;
  color: var(--accent);
  transition: background .15s ease, color .15s ease;
}
.detail-play:hover { background: var(--accent); color: #fff; }

.tracklist {
  list-style: none;
  margin-top: 64px;
  border-top: 1px solid var(--ink);
}
.track {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 20px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.track .n { color: var(--ink-faint); }
.track .dur { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.track-right { display: flex; align-items: center; }

.track-remove {
  border: none;
  background: none;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  margin-left: 14px;
}
.track-remove:hover { color: #d64545; }

.track-add {
  margin-top: 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-faint);
  background: none;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.track-add:hover { color: var(--accent); border-color: var(--accent); }

/* 页脚 */
footer {
  margin-top: 120px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-faint);
}

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 40px); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .detail-head { grid-template-columns: 1fr; gap: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact a + a { margin-left: 24px; }
}
