:root {
  --bg: #F8FAF8;
  --text: #1F2937;
  --primary: #166534;
  --secondary: #A0AEC0;
  --accent: #C2410C;
  --card: rgba(255, 255, 255, 0.86);
  --border: rgba(22, 101, 52, 0.16);
  --shadow: 0 18px 40px rgba(31, 41, 55, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(194, 65, 12, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(22, 101, 52, 0.10), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Gill Sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

body {
  min-height: 100vh;
}

.shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.hero {
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(248,250,248,0.82));
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0;
  color: var(--primary);
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  color: rgba(31, 41, 55, 0.75);
  font-size: 15px;
  line-height: 1.6;
}

.scene-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 2px 4px;
  margin: 10px 0 16px;
  scrollbar-width: thin;
}

.scene-pill {
  appearance: none;
  border: 1px solid rgba(22, 101, 52, 0.18);
  background: rgba(255,255,255,0.75);
  color: var(--primary);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.scene-pill:hover { transform: translateY(-1px); }
.scene-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.layout {
  display: grid;
  grid-template-columns: minmax(270px, 340px) 1fr;
  gap: 16px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 14px;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.sidebar h2, .detail h2 {
  margin: 4px 4px 10px;
  font-size: 18px;
  color: var(--primary);
}

.lesson-list {
  display: grid;
  gap: 8px;
}

.lesson-button {
  appearance: none;
  border: 1px solid transparent;
  text-align: left;
  width: 100%;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.72);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.lesson-button:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 65, 12, 0.25);
}

.lesson-button.active {
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.10), rgba(194, 65, 12, 0.08));
  border-color: rgba(22, 101, 52, 0.28);
}

.lesson-button .num {
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-button .title {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}

.lesson-button .pattern {
  display: block;
  margin-top: 4px;
  color: rgba(31, 41, 55, 0.7);
  font-size: 13px;
  line-height: 1.45;
}

.detail {
  padding: 18px 20px 22px;
}

.lesson-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.lesson-head h3 {
  margin: 0;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.lesson-head .scene-tag {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.meta-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(160, 174, 192, 0.18);
}

.meta-card .label {
  display: block;
  color: var(--secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 800;
}

.meta-card .value {
  font-size: 15px;
  line-height: 1.7;
}

.examples {
  display: grid;
  gap: 12px;
}

.example-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(22, 101, 52, 0.14);
}

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

.example-top .english {
  font-size: 16px;
  line-height: 1.5;
}

.example-top .english mark {
  background: rgba(194, 65, 12, 0.14);
  color: inherit;
  padding: 0 2px;
  border-radius: 4px;
}

.audio-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-wrap audio {
  width: 240px;
  max-width: 45vw;
}

.duration {
  color: var(--secondary);
  font-size: 12px;
  min-width: 48px;
}

.example-cn {
  color: rgba(31, 41, 55, 0.86);
  font-size: 14px;
  line-height: 1.65;
}

.empty {
  padding: 22px;
  color: rgba(31, 41, 55, 0.68);
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1000px);
  }

  .hero, .detail {
    padding-left: 16px;
    padding-right: 16px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .lesson-head {
    flex-direction: column;
  }

  .example-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .audio-wrap audio {
    width: 100%;
    max-width: none;
  }
}
