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

body {
  font-family: "Noto Serif SC", "Source Han Serif SC", "SimSun", "宋体", serif;
  background: #faf8f5;
  color: #2c2c2c;
  min-height: 100vh;
}

#main-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e8e8e8;
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner { max-width: 1100px; margin: 0 auto; }
#site-title {
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: 2px;
}
#site-title.clickable { cursor: pointer; }
#breadcrumb {
  margin-top: 6px;
  font-size: 0.85em;
  color: #a0b4d0;
}
#breadcrumb span { cursor: pointer; }
#breadcrumb span:hover { color: #fff; }
#breadcrumb .sep { margin: 0 6px; color: #556; }

.view { display: none; max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.view.active { display: block; }

.section-label {
  font-size: 1.1em;
  font-weight: 700;
  color: #555;
  margin: 28px 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid #d4c5a9;
  letter-spacing: 4px;
}
.section-label:first-child { margin-top: 0; }

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}
.lesson-card {
  background: #fff;
  border: 1px solid #e8e0d4;
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border-color: #c4a97d;
}
.lesson-card .card-num {
  font-size: 0.8em;
  color: #999;
  margin-bottom: 4px;
}
.lesson-card .card-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #2c2c2c;
}
.lesson-card .card-sub {
  font-size: 0.85em;
  color: #888;
  margin-top: 4px;
}

.page-title {
  font-size: 1.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
  color: #1a1a2e;
}
.sublist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}
.sublist-item {
  background: #fff;
  border: 1px solid #e8e0d4;
  border-radius: 10px;
  padding: 16px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}
.sublist-item:hover {
  background: #fdf8f0;
  border-color: #c4a97d;
  transform: translateX(4px);
}
.sublist-item .sub-num {
  font-size: 1.3em;
  font-weight: 700;
  color: #c4a97d;
  min-width: 28px;
}
.sublist-item .sub-info .sub-title {
  font-size: 1.05em;
  font-weight: 600;
  color: #2c2c2c;
}
.sublist-item .sub-info .sub-author {
  font-size: 0.85em;
  color: #888;
  margin-top: 2px;
}

.piece-header {
  text-align: center;
  margin-bottom: 32px;
}
.piece-title {
  font-size: 1.8em;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.piece-author {
  font-size: 1em;
  color: #888;
}

.piece-body {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
}
.piece-col {
  flex: 1;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e8e0d4;
  min-height: 200px;
}
.piece-col:first-child { border-radius: 10px 0 0 10px; border-right: none; }
.piece-col:last-child { border-radius: 0 10px 10px 0; }
.piece-divider {
  width: 2px;
  background: #d4c5a9;
  align-self: stretch;
}
.col-label {
  font-size: 0.8em;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-align: center;
}
.col-label-mobile { display: none; }

.piece-text {
  font-size: 1.15em;
  line-height: 2.2;
  text-align: center;
}
.piece-text .text-line {
  display: block;
  margin: 0;
  padding: 2px 0;
}

.audio-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}
.audio-btn {
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 0.95em;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.audio-btn:hover { background: #2c3e6b; }
.audio-btn.playing {
  background: #c0392b;
  animation: pulse 1.2s infinite;
}
.audio-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { font-size: 0.9em; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}

.piece-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.nav-btn {
  background: #f0ebe3;
  color: #555;
  border: 1px solid #d4c5a9;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 0.95em;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.nav-btn:hover { background: #e8dfd3; color: #333; }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 768px) {
  #main-header { padding: 14px 16px; }
  #site-title { font-size: 1.1em; }
  .view { padding: 16px 12px; }
  
  .piece-body {
    flex-direction: column;
    gap: 0;
  }
  .piece-col:first-child { border-radius: 10px 10px 0 0; border-right: 1px solid #e8e0d4; border-bottom: none; }
  .piece-col:last-child { border-radius: 0 0 10px 10px; }
  .piece-divider { width: 100%; height: 2px; }
  .col-label-mobile {
    display: block;
    text-align: center;
    font-size: 0.8em;
    color: #aaa;
    padding: 6px 0;
    background: #f5f0e8;
    border-left: 1px solid #e8e0d4;
    border-right: 1px solid #e8e0d4;
  }
  
  .piece-title { font-size: 1.4em; }
  .piece-text { font-size: 1.05em; line-height: 2; }
  
  .lesson-grid { grid-template-columns: 1fr; }
  .audio-controls { flex-direction: column; align-items: center; }
  .audio-btn { width: 100%; max-width: 280px; justify-content: center; }
}
