:root {
  --bg: #f7f5f0;
  --card: #ffffff;
  --ink: #2b2622;
  --muted: #8a7f74;
  --accent: #c0392b;      /* 乐坊红 */
  --accent2: #2c7a7b;     /* 青 */
  --line: #e7e1d6;
  --done: #2e8b57;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--accent); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 34px; }
.site-header h1 { margin: 0; font-size: 20px; }
.site-header .sub { margin: 0; font-size: 12px; opacity: .85; }
.progress {
  background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 20px;
  font-size: 13px; white-space: nowrap;
}
.notice {
  margin: 14px 16px 0; padding: 10px 14px; font-size: 13px;
  background: #fff7e6; border: 1px solid #ffe1a8; border-radius: 10px; color: #7a5a16;
}
main { max-width: 820px; margin: 0 auto; padding: 16px; }

.course {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.course-head {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 14px 16px;
}
.course-head:hover { background: #faf8f3; }
.course-no {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--accent2); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.course-meta { flex: 1; }
.course-meta h2 { margin: 0; font-size: 16px; }
.course-meta .en { font-size: 12px; color: var(--muted); }
.course-meta .info { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chevron { transition: transform .2s; color: var(--muted); }
.course.open .chevron { transform: rotate(90deg); }

.phrase-list { display: none; padding: 0 16px 16px; }
.course.open .phrase-list { display: block; }
.phrase {
  border-top: 1px dashed var(--line); padding: 12px 0;
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
}
.phrase.done .label { text-decoration: line-through; color: var(--muted); }
.pcheck { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--done); }
.label { font-weight: 600; font-size: 14px; }
.goal { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.players { display: flex; flex-wrap: wrap; gap: 10px; }
.player { flex: 1 1 220px; min-width: 180px; background: #f6f3ec; border-radius: 10px; padding: 8px; }
.player .tag { font-size: 11px; color: var(--accent); font-weight: 700; }
.player audio { width: 100%; height: 34px; margin-top: 4px; }
.player a.dl { font-size: 11px; color: var(--accent2); text-decoration: none; }
.course-cover {
  width: 48px; height: 48px; flex: none; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
}
.score-gallery { margin: 2px 16px 0; }
.score-label { font-size: 12px; color: var(--accent2); font-weight: 700; margin: 10px 0 6px; }
.score-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.score-thumb {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 5px; background: #fff; cursor: zoom-in; text-decoration: none;
  max-width: 100%;
}
.score-thumb img { max-height: 190px; max-width: 100%; height: auto; width: auto; display: block; border-radius: 6px; }
.no-score { font-size: 12px; color: var(--muted); margin: 10px 0 0; font-style: italic; }

/* 注意：灯箱默认必须 display:none。之前写 display:grid 会把 [hidden] 属性顶掉，
   导致灯箱常驻（右上角一直挂个 ✕）。改用 .show 类来开关。 */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; place-items: center; z-index: 50;
}
.lightbox.show { display: grid; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 16px; right: 20px; background: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer;
}
.site-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 24px; }

@media (max-width: 520px) {
  .player { flex-basis: 100%; }
  .site-header h1 { font-size: 17px; }
}
