:root {
  --ink: #1f2a24;
  --muted: #68756e;
  --line: #dfe6df;
  --paper: #fffdf7;
  --soft: #f4f7f1;
  --brand: #2f6f4e;
  --brand-dark: #21533a;
  --accent: #b95d32;
  --shadow: 0 10px 30px rgba(31, 42, 36, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.7;
  background: var(--paper);
}

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

img,
svg {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0 clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.96);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 6px;
}

.site-nav {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand-dark);
  background: var(--soft);
}

.search-form input {
  width: 170px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.menu-toggle {
  display: none;
}

.hero,
.poem-hero {
  min-height: 520px;
  padding: clamp(48px, 8vw, 92px) clamp(18px, 6vw, 80px);
  background:
    linear-gradient(90deg, rgba(255, 253, 247, 0.96), rgba(255, 253, 247, 0.78)),
    repeating-linear-gradient(135deg, #eff4ed 0, #eff4ed 1px, transparent 1px, transparent 16px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  width: min(1120px, 100%);
  min-height: calc(520px - clamp(48px, 8vw, 92px) * 2);
  margin: 0 auto;
}

.poem-hero {
  display: block;
  min-height: auto;
  text-align: center;
}

.poem-hero-inner {
  width: min(960px, 100%);
  margin: 0 auto;
}

.poem-meta {
  color: var(--muted);
  font-weight: 700;
}

.poem-hero .hero-actions {
  justify-content: center;
}

.hero h1,
.page-title h1,
.poem-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.15;
  letter-spacing: 0;
}

.hero p,
.page-title p,
.poem-hero > p {
  max-width: 680px;
  color: var(--muted);
}

.poem-hero > p,
.poem-hero h1,
.poem-hero .poem-text {
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--brand);
}

.button.secondary,
.button.small {
  color: var(--brand-dark);
  background: #fff;
}

.button.small {
  min-height: 36px;
  padding: 6px 12px;
}

.hero-panel {
  display: flex;
  justify-content: center;
}

.paper-preview {
  width: min(100%, 360px);
  min-height: 320px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.paper-preview span {
  color: var(--accent);
  font-weight: 700;
}

.paper-preview strong {
  display: block;
  margin: 32px 0 12px;
  font-size: 48px;
  font-family: SimSun, serif;
}

.section,
.page-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0;
}

.page-shell.narrow {
  width: min(820px, calc(100% - 36px));
}

.poem-page .page-shell > * + * {
  margin-top: 22px;
}

.breadcrumb {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
}

.breadcrumb a::after {
  content: "/";
  margin: 0 8px;
  color: var(--muted);
}

.section.muted {
  width: 100%;
  padding-left: max(18px, calc((100% - 1120px) / 2));
  padding-right: max(18px, calc((100% - 1120px) / 2));
  background: var(--soft);
}

.section-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-heading.compact {
  display: block;
}

.poem-page .section-heading,
.poem-page .section-heading.compact,
.poem-page .content-card > h2 {
  text-align: center;
}

.poem-page .section-heading p {
  margin-left: auto;
  margin-right: auto;
}

.section-heading h2,
.content-card h2,
.page-title h1 {
  margin-top: 0;
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.grade-grid,
.poem-grid,
.feature-list,
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grade-card,
.poem-card,
.content-card,
.tool-grid a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.grade-card,
.poem-card,
.tool-grid a {
  padding: 22px;
}

.grade-card span,
.tag-row span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.grade-card strong,
.poem-card h3 {
  display: block;
  margin: 6px 0;
  font-size: 22px;
}

.grade-card small,
.poem-card p,
.feature-list p,
.content-card p,
.list-row p {
  color: var(--muted);
}

.poem-card.featured {
  border-color: rgba(47, 111, 78, 0.35);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.tag-row span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f7eee9;
}

.text-link {
  color: var(--brand-dark);
  font-weight: 700;
}

.feature-list {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.tool-grid a {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  font-weight: 700;
}

.poem-page .tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.poem-page .tool-grid a {
  width: auto;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: none;
}

.page-title {
  margin-bottom: 28px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-button {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.filter-button.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.list-table {
  display: grid;
  gap: 12px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, auto) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.list-row h2 {
  margin: 0;
  font-size: 22px;
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.content-card {
  padding: clamp(20px, 4vw, 30px);
}

.content-card > h2 + * {
  margin-top: 16px;
}

.preview-card {
  display: grid;
  gap: 22px;
}

.read-card,
.mistake-card,
.exam-points,
.scene-card {
  padding-top: 2px;
}

.read-card h3,
.mistake-card h3,
.exam-points h3,
.scene-card h3 {
  margin: 0 0 12px;
  text-align: center;
}

.compact-poem {
  margin-top: 0;
}

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

.mistake-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.mistake-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 26px;
  font-family: SimSun, serif;
  text-align: center;
}

.mistake-grid span {
  color: var(--muted);
  font-size: 14px;
}

.compare-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compare-table > div {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.1fr;
  border-top: 1px solid var(--line);
}

.compare-table > div:first-child {
  border-top: 0;
}

.compare-table span {
  padding: 12px;
  border-left: 1px solid var(--line);
}

.compare-table span:first-child {
  border-left: 0;
  font-weight: 700;
}

.compare-head {
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.exam-points ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: exam-point;
}

.exam-points li {
  position: relative;
  min-height: 58px;
  padding: 12px 12px 12px 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  counter-increment: exam-point;
}

.exam-points li::before {
  content: counter(exam-point);
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.exam-points strong {
  display: block;
  margin-bottom: 3px;
}

.exam-points span {
  color: var(--muted);
}

.scene-card p {
  margin: 0;
  color: var(--muted);
}

.teaching-guide h3 {
  margin: 0 0 12px;
  text-align: center;
}

.teaching-grid {
  display: grid;
  gap: 10px;
}

.teaching-grid div {
  padding: 12px 14px;
  border: 1px solid #d8e3dc;
  border-radius: 8px;
  background: #fbfdfb;
}

.teaching-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-dark);
}

.teaching-grid span {
  color: var(--muted);
}

.poet-intro h3 {
  margin: 0 0 12px;
  text-align: center;
}

.poet-intro p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #e4ded2;
  border-radius: 8px;
  color: var(--muted);
  background: #fffbf3;
}

.scene-note {
  padding: 16px;
  border: 1px solid rgba(185, 93, 50, 0.22);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff8f3;
}

.scene-note strong {
  display: block;
  margin-bottom: 6px;
  color: #8f3f20;
}

.print-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.file-action {
  gap: 8px;
}

.mini-file-icon {
  width: 22px;
  height: 26px;
}

.mini-file-icon strong {
  height: 9px;
  font-size: 6px;
}

.mini-file-icon .file-lines {
  top: 7px;
  left: 5px;
  width: 10px;
  height: 7px;
  background:
    linear-gradient(#cfd8d1, #cfd8d1) 0 0 / 10px 1px no-repeat,
    linear-gradient(#cfd8d1, #cfd8d1) 0 3px / 9px 1px no-repeat,
    linear-gradient(#cfd8d1, #cfd8d1) 0 6px / 8px 1px no-repeat;
}

.print-template {
  display: none;
}

.poem-text {
  width: min(720px, 100%);
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.poem-text.large {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.8;
  font-family: SimSun, serif;
}

.lyric-text {
  display: grid;
  gap: 18px;
  width: min(760px, 100%);
  padding: 24px clamp(18px, 4vw, 34px);
  text-align: left;
  font-family: SimSun, "Noto Serif CJK SC", serif;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.9;
}

.lyric-part {
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.lyric-part:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.lyric-text p {
  margin: 0 0 8px;
}

.lyric-text p:last-child {
  margin-bottom: 0;
}

.definition-list {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.definition-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.clean-list {
  padding-left: 20px;
  color: var(--muted);
}

.quiz {
  display: grid;
  gap: 16px;
}

.quiz-topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quiz-topbar div {
  display: grid;
  gap: 2px;
}

.quiz-topbar div:last-child {
  text-align: right;
}

.quiz-topbar span {
  color: var(--muted);
  font-size: 13px;
}

.quiz-progress {
  height: 8px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.quiz-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.2s ease;
}

.question {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.quiz-section.active {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.quiz-section.active .section-heading {
  margin-bottom: 18px;
}

.quiz-section.active .question {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.question h3 {
  margin-top: 0;
}

.question-type {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 10px;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #eaf4ed;
  font-size: 13px;
  font-weight: 700;
}

.trap {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  color: #7a412a;
  background: #fff5ee;
}

.question button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.question button.correct {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #eaf4ed;
}

.question button.wrong {
  border-color: var(--accent);
  color: #8f3f20;
  background: #fff0e9;
}

.question.answered button {
  cursor: default;
}

.question.answered button:not(.correct):not(.wrong) {
  opacity: 0.68;
}

.explain {
  display: none;
}

.question.answered .explain {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #c8d9ef;
  border-left: 4px solid #3f6ea8;
  border-radius: 8px;
  background: #f4f8ff;
}

.explain strong {
  color: #234f84;
}

.explain p {
  margin: 0;
  color: var(--muted);
}

.explain span {
  display: inline-block;
  min-width: 78px;
  margin-right: 6px;
  color: #234f84;
  font-weight: 700;
}

.score-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.result-screen {
  min-height: min(460px, calc(100vh - 180px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.result-screen h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

.medal-badge {
  width: 72px;
  height: 86px;
  align-self: center;
  margin: 0 0 10px;
}

.medal-badge svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 14px rgba(31, 42, 36, 0.14));
}

.medal-ribbon {
  fill: #2f6f4e;
}

.medal-ribbon.right {
  fill: #265f43;
}

.medal-outer {
  fill: #e7a928;
  stroke: #f0c76a;
  stroke-width: 4;
}

.medal-inner {
  fill: #f7d777;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 3;
}

.medal-star {
  fill: #fff5bf;
}

.medal-badge[data-level="银"] .medal-outer {
  fill: #b8c2cc;
  stroke: #d7dee6;
}

.medal-badge[data-level="银"] .medal-inner {
  fill: #e8edf2;
}

.medal-badge[data-level="银"] .medal-star {
  fill: #ffffff;
}

.medal-badge[data-level="铜"] .medal-outer {
  fill: #c87a3b;
  stroke: #d7a071;
}

.medal-badge[data-level="铜"] .medal-inner {
  fill: #e9b17f;
}

.medal-badge[data-level="铜"] .medal-star {
  fill: #ffe0bd;
}

.medal-badge[data-level="加"] .medal-outer {
  fill: #8fc0a6;
  stroke: #bfe4cd;
}

.medal-badge[data-level="加"] .medal-inner {
  fill: #dff2e7;
}

.medal-badge[data-level="加"] .medal-star {
  fill: #ffffff;
}

.result-score {
  margin: 4px 0;
  color: var(--brand-dark);
  font-size: 34px;
  font-weight: 800;
}

.result-rating {
  display: inline-flex;
  align-self: center;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff !important;
  background: #1f6b49;
  font-weight: 700;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 16px 0;
}

.diagnosis-grid div {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.diagnosis-grid span {
  color: var(--muted);
  font-size: 13px;
}

.wrongbook {
  width: 100%;
  text-align: left;
}

.wrongbook h4 {
  margin: 10px 0;
  text-align: center;
}

.wrong-item {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wrong-item p {
  margin: 4px 0 0;
}

.quiz-actions,
.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.print-sheet {
  margin: 16px 0;
  padding: 20px;
  border: 1px dashed var(--muted);
  background: #fff;
}

.download-heading h2 {
  margin-bottom: 6px;
}

.download-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.download-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.download-file:hover {
  border-color: rgba(47, 111, 78, 0.45);
}

.file-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.download-file h3 {
  margin: 0;
}

.download-file p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.download-file > div:nth-child(2) {
  grid-column: 1 / -1;
}

.file-icon {
  position: relative;
  display: grid;
  width: 28px;
  height: 34px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #d6dcd6;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(31, 42, 36, 0.08);
}

.file-icon strong {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  height: 12px;
  place-items: center;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}

.file-corner {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-left: 1px solid #d6dcd6;
  border-bottom: 1px solid #d6dcd6;
  background: #eef2ef;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.file-lines {
  position: absolute;
  top: 9px;
  left: 6px;
  width: 14px;
  height: 9px;
  background:
    linear-gradient(#cfd8d1, #cfd8d1) 0 0 / 14px 1px no-repeat,
    linear-gradient(#cfd8d1, #cfd8d1) 0 4px / 12px 1px no-repeat,
    linear-gradient(#cfd8d1, #cfd8d1) 0 8px / 10px 1px no-repeat;
}

.word-icon {
  border-color: #bdd0eb;
}

.word-icon strong {
  background: #2f6fbe;
}

.blank-lines {
  height: 112px;
  margin: 14px 0;
  background: repeating-linear-gradient(#fff 0, #fff 34px, #cfd8cf 35px);
}

.blank-lines.short {
  height: 72px;
}

.recite-box.hidden p {
  color: transparent;
  text-shadow: 0 0 8px rgba(31, 42, 36, 0.28);
  user-select: none;
}

.checkin-list {
  padding-left: 20px;
}

.site-footer {
  padding: 28px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.footer-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  body {
    font-size: 15px;
    line-height: 1.65;
  }

  h1,
  h2,
  h3,
  p {
    overflow-wrap: anywhere;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
    font-size: 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
  }

  .menu-toggle {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }

  .site-nav,
  .search-form {
    display: none;
  }

  .site-nav.open {
    display: grid;
    grid-column: 1 / -1;
    justify-content: stretch;
    gap: 2px;
    padding-top: 8px;
  }

  .site-nav a {
    padding: 10px 8px;
    border-radius: 6px;
  }

  .hero {
    min-height: auto;
    padding: 34px 18px 42px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 22px;
  }

  .hero h1,
  .page-title h1,
  .poem-hero h1 {
    font-size: 34px;
    line-height: 1.18;
  }

  .hero p,
  .page-title p,
  .poem-hero > p {
    margin-bottom: 0;
  }

  .hero-panel {
    justify-content: start;
  }

  .hero-actions,
  .action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .button {
    width: 100%;
    min-height: 46px;
  }

  .paper-preview {
    width: 100%;
    min-height: 210px;
    padding: 22px;
  }

  .paper-preview strong {
    margin: 18px 0 8px;
    font-size: 38px;
  }

  .poem-hero {
    padding: 32px 18px 38px;
  }

  .poem-hero .hero-actions {
    width: min(360px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .poem-text {
    margin-top: 18px;
    padding: 18px 14px;
  }

  .poem-text.large {
    font-size: 28px;
    line-height: 1.9;
  }

  .lyric-text {
    gap: 14px;
    padding: 18px 16px;
    font-size: 19px;
    line-height: 1.85;
  }

  .lyric-part {
    padding-bottom: 14px;
  }

  .section,
  .page-shell {
    width: min(100% - 28px, 1120px);
    padding: 34px 0;
  }

  .page-shell > .content-card,
  .page-shell > .study-layout,
  .page-shell > .section {
    width: 100%;
  }

  .section.muted {
    padding: 34px 14px;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .section-heading h2,
  .content-card h2 {
    margin-bottom: 6px;
    font-size: 22px;
    line-height: 1.25;
  }

  .grade-grid,
  .poem-grid,
  .feature-list,
  .tool-grid,
  .study-layout {
    grid-template-columns: 1fr;
  }

  .poem-page .tool-grid {
    display: flex;
  }

  .poem-page .tool-grid a {
    min-height: 38px;
    width: auto;
    padding: 7px 12px;
    border-radius: 999px;
  }

  .section-heading,
  .footer-inner {
    display: block;
  }

  .grade-card,
  .poem-card,
  .tool-grid a {
    padding: 18px;
  }

  .grade-card strong,
  .poem-card h3 {
    font-size: 20px;
  }

  .content-card {
    padding: 18px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: none;
  }

  .list-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .list-row .button {
    justify-self: stretch;
  }

  .definition-list div {
    grid-template-columns: 64px 1fr;
    gap: 10px;
  }

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

  .compare-table {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .compare-table > div,
  .compare-table > .compare-head {
    grid-template-columns: 1fr;
  }

  .compare-head {
    display: none !important;
  }

  .compare-table span {
    border-left: 0;
    border-top: 1px dashed var(--line);
  }

  .compare-table span::before {
    content: attr(data-label);
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
  }

  .compare-table span:first-child {
    border-top: 0;
    background: var(--soft);
  }

  .print-actions {
    grid-template-columns: 1fr;
  }

  .question {
    padding: 14px;
  }

  .question button {
    min-height: 44px;
  }

  .download-list {
    gap: 10px;
  }

  .download-file {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 10px;
    padding: 16px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .download-file .button {
    justify-self: stretch;
  }

  .file-icon {
    width: 26px;
    height: 32px;
  }

  .site-footer {
    padding: 22px 18px;
  }

  .site-footer nav {
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .site-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero h1,
  .page-title h1,
  .poem-hero h1 {
    font-size: 30px;
  }

  .poem-text.large {
    font-size: 25px;
  }

  .lyric-text {
    font-size: 18px;
    line-height: 1.8;
  }

  .tag-row span {
    font-size: 13px;
  }

  .content-card,
  .grade-card,
  .poem-card,
  .tool-grid a {
    border-radius: 0;
  }
}

@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .no-print,
  .hero-actions {
    display: none !important;
  }

  body[data-print-mode] main > :not(.page-shell),
  body[data-print-mode] .page-shell > :not(.print-template) {
    display: none !important;
  }

  body[data-print-mode] .print-template:not([hidden]) {
    display: block !important;
  }

  .page-shell,
  .section {
    width: 100%;
    padding: 0;
  }

  .content-card,
  .poem-text,
  .print-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
