/* Modern-poem skin: a near-to-far autumn sound theatre for lesson 7. */
:root {
  --lesson-bg: #e8edef;
  --lesson-paper: #fffdf7;
  --lesson-ink: #26363b;
  --lesson-muted: #566a70;
  --lesson-accent: #823b22;
  --lesson-accent-soft: #f1dbc0;
  --lesson-gold: #d49a36;
  --lesson-deep: #314f5a;
  --lesson-line: rgba(38, 54, 59, .17);
}

body[data-visual-system="autumn-sound-theater"] {
  background:
    radial-gradient(circle at 8% 9%, rgba(212, 154, 54, .16), transparent 27rem),
    radial-gradient(circle at 91% 30%, rgba(87, 126, 139, .19), transparent 30rem),
    linear-gradient(180deg, #f6f4ed 0, var(--lesson-bg) 52rem);
}

body[data-visual-system="autumn-sound-theater"] .lesson-topbar {
  background: rgba(39, 64, 73, .97);
}

body[data-visual-system="autumn-sound-theater"] .lesson-hero {
  overflow: hidden;
  border-radius: 22px 76px 22px 22px;
  background:
    linear-gradient(90deg, rgba(49, 79, 90, .035) 1px, transparent 1px),
    rgba(255, 253, 247, .97);
  background-size: 34px 100%;
}

body[data-visual-system="autumn-sound-theater"] .hero-copy {
  position: relative;
}

body[data-visual-system="autumn-sound-theater"] .hero-copy::before {
  content: "秋声剧场  /  07";
  position: absolute;
  top: 18px;
  right: 28px;
  color: rgba(49, 79, 90, .56);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}

body[data-visual-system="autumn-sound-theater"] .lesson-mark,
body[data-visual-system="autumn-sound-theater"] .section-kicker {
  color: var(--lesson-accent);
}

body[data-visual-system="autumn-sound-theater"] .hero-copy h1 {
  max-width: 7em;
  color: var(--lesson-deep);
  font-size: clamp(48px, 6.6vw, 80px);
  letter-spacing: .025em;
}

.sound-author {
  margin: -8px 0 18px;
  color: var(--lesson-muted);
  font-family: var(--lesson-serif);
  font-size: 18px;
  letter-spacing: .13em;
}

body[data-visual-system="autumn-sound-theater"] .learning-path li {
  color: #3b4d52;
  background: #edf2ef;
  border: 1px solid rgba(49, 79, 90, .14);
}

body[data-visual-system="autumn-sound-theater"] .hero-visual {
  min-height: 590px;
  background: #eee8dc;
}

body[data-visual-system="autumn-sound-theater"] .hero-visual img {
  object-fit: contain;
  object-position: 50% 50%;
  background: #f7f3e9;
}

body[data-visual-system="autumn-sound-theater"] .hero-visual figcaption {
  color: #fffdf7;
  background: rgba(39, 64, 73, .94);
}

body[data-visual-system="autumn-sound-theater"] .reader-dock {
  background: rgba(39, 64, 73, .97);
  border-color: rgba(255, 253, 247, .14);
}

body[data-visual-system="autumn-sound-theater"] .mode-switch button[aria-pressed="true"],
body[data-visual-system="autumn-sound-theater"] .reader-actions button {
  color: #263f48;
  background: #fff9ec;
}

body[data-visual-system="autumn-sound-theater"] .lesson-section {
  background:
    linear-gradient(90deg, rgba(49, 79, 90, .032) 1px, transparent 1px),
    rgba(255, 253, 247, .97);
  background-size: 34px 100%;
}

.sound-original-card {
  padding: clamp(28px, 5vw, 50px);
  background:
    radial-gradient(circle at 85% 12%, rgba(212, 154, 54, .13), transparent 19rem),
    #fffaf0;
}

.sound-original-card::before {
  content: "教材原诗";
  background: var(--lesson-deep);
}

.sound-original-card [data-testid="textbook-original"] {
  display: grid;
  gap: 22px;
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(20px, 2.55vw, 29px);
  letter-spacing: .055em;
  line-height: 1.95;
}

.sound-stanza {
  position: relative;
  margin: 0;
  padding: 0 0 0 3.1rem;
}

.sound-stanza::before {
  content: attr(data-paragraph-id);
  position: absolute;
  top: .22rem;
  left: 0;
  color: var(--lesson-accent);
  font-family: var(--lesson-sans);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.sound-pause-guide {
  color: #31494f;
  background: linear-gradient(90deg, #eff3f0, #f7ecd7);
  border-left-color: var(--lesson-accent);
}

.segment-sound {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.segment-sound .segment-button {
  min-height: 54px;
  padding: 10px 13px;
  color: #fffdf7;
  cursor: pointer;
  background: #3a5964;
  border: 1px solid rgba(255, 253, 247, .2);
  border-radius: 12px;
  font-weight: 850;
}

.segment-sound .segment-button:hover,
.segment-sound .segment-button[aria-pressed="true"] {
  background: #6f321f;
}

.sound-pronunciations {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sound-pronunciations .sound-card {
  background: #f5f1e8;
}

.sound-pronunciations .sound-card:first-child {
  background: #f4e2c7;
  border-color: rgba(130, 59, 34, .28);
}

.sound-spaces {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.space-card {
  min-width: 0;
  padding: 22px;
  color: #f9fbf7;
  background: #314f5a;
  border-radius: 16px;
}

.space-card:nth-child(2) {
  background: #456873;
}

.space-card:nth-child(3) {
  color: #3a301d;
  background: #e2bd75;
}

.space-card:nth-child(4) {
  background: #6f321f;
}

.space-card strong {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: #314f5a;
  background: #fffaf0;
  border-radius: 50%;
  font-family: var(--lesson-serif);
  font-size: 18px;
}

.space-card h3 {
  margin: 0 0 8px;
  font-family: var(--lesson-serif);
  font-size: 22px;
}

.space-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
}

.metaphor-note {
  margin: 18px 0 0;
  padding: 16px 18px;
  color: #3f3a2d;
  background: #f7e6c8;
  border: 1px solid rgba(130, 59, 34, .18);
  border-radius: 14px;
}

.sound-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  counter-reset: sound-stage;
}

.sound-stage {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #f9fbf7;
  background: #2c4650;
  border: 1px solid rgba(49, 79, 90, .2);
  border-radius: 16px;
  counter-increment: sound-stage;
}

.sound-stage::before {
  content: "0" counter(sound-stage);
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fffaf0;
  background: rgba(39, 64, 73, .92);
  border: 1px solid rgba(255, 250, 240, .56);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.sound-stage img {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  background: #f5f0e5;
  transition: transform .45s ease;
}

.sound-stage:hover img {
  transform: scale(1.018);
}

.sound-stage figcaption {
  min-height: 108px;
  padding: 13px 14px 15px;
  color: #eaf0ee;
  font-size: 13px;
  line-height: 1.65;
}

.sound-stage b {
  display: block;
  margin-bottom: 3px;
  color: #f2c773;
  font-family: var(--lesson-serif);
  font-size: 17px;
}

.sound-stage:last-child {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(190px, .95fr);
}

.sound-stage:last-child img {
  aspect-ratio: auto;
  height: 100%;
  min-height: 390px;
}

.sound-stage:last-child figcaption {
  min-height: 0;
  display: grid;
  align-content: center;
  padding: 24px;
}

.sound-task .task-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.sound-task .task-list li {
  position: relative;
  padding: 15px 18px 15px 54px;
  color: #334a51;
  background: #f4f1e9;
  border: 1px solid rgba(49, 79, 90, .14);
  border-radius: 14px;
}

.sound-task .task-list li::before {
  content: "听";
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fffdf7;
  background: #6f321f;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

body[data-visual-system="autumn-sound-theater"] .recite-panel {
  background:
    radial-gradient(circle at 84% 14%, rgba(212, 154, 54, .22), transparent 22rem),
    linear-gradient(135deg, #2d4953, #3d626d);
}

body[data-visual-system="autumn-sound-theater"] .recite-panel .section-kicker,
body[data-visual-system="autumn-sound-theater"] .recite-panel .section-heading p,
body[data-visual-system="autumn-sound-theater"] .recite-panel .recite-hint {
  color: #fffdf7;
}

.sound-recitation .recite-prompt,
.sound-recitation .recite-answer {
  white-space: pre-line;
}

.sound-video video {
  max-height: 640px;
  object-fit: contain;
  background: #263f48;
}

body[data-visual-system="autumn-sound-theater"] .disclosure,
body[data-visual-system="autumn-sound-theater"] .lesson-footer {
  color: #42565c;
}

@media (max-width: 1020px) {
  .segment-sound,
  .sound-pronunciations,
  .sound-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sound-stage:last-child {
    grid-column: span 1;
    display: block;
  }

  .sound-stage:last-child img {
    min-height: 0;
    height: auto;
    aspect-ratio: 9 / 16;
  }

  .sound-stage:last-child figcaption {
    min-height: 108px;
    display: block;
    padding: 13px 14px 15px;
  }
}

@media (max-width: 760px) {
  body[data-visual-system="autumn-sound-theater"] .hero-copy::before {
    display: none;
  }

  body[data-visual-system="autumn-sound-theater"] .hero-visual {
    min-height: 380px;
  }

  .sound-spaces {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segment-sound,
  .sound-pronunciations,
  .sound-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sound-stage:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sound-stage:last-child img {
    height: 100%;
    min-height: 330px;
    aspect-ratio: auto;
  }

  .sound-stage:last-child figcaption {
    min-height: 0;
    display: grid;
    align-content: center;
    padding: 20px;
  }
}

@media (max-width: 520px) {
  body[data-visual-system="autumn-sound-theater"] .lesson-hero {
    border-radius: 18px 44px 18px 18px;
  }

  body[data-visual-system="autumn-sound-theater"] .hero-copy h1 {
    font-size: clamp(43px, 13.5vw, 58px);
  }

  body[data-visual-system="autumn-sound-theater"] .hero-visual {
    min-height: 350px;
  }

  .sound-original-card {
    padding-inline: 19px;
  }

  .sound-original-card [data-testid="textbook-original"] {
    gap: 19px;
    font-size: clamp(19px, 5.6vw, 23px);
    letter-spacing: .02em;
  }

  .sound-stanza {
    padding-left: 2.45rem;
  }

  .segment-sound,
  .sound-pronunciations,
  .sound-spaces {
    grid-template-columns: 1fr;
  }

  .sound-map {
    gap: 9px;
  }

  .sound-stage figcaption {
    min-height: 116px;
    padding: 10px;
  }

  .sound-stage:last-child {
    display: block;
  }

  .sound-stage:last-child img {
    height: auto;
    min-height: 0;
    aspect-ratio: 5 / 4;
    object-position: 50% 58%;
  }

  .sound-stage:last-child figcaption {
    min-height: 106px;
    display: block;
    padding: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sound-stage img {
    transition: none;
  }
}
