:root {
  --deep-forest: #0d2a20;
  --pine: #143b2c;
  --moss: #668451;
  --bud: #b9d96c;
  --ivory: #f7f5ed;
  --tint: #eef1e2;
  --ink: #2b2b26;
  --muted: #5f5e5a;
  --line: #dde3cf;
  --white: #ffffff;
  --magic: #4e9b3c;
  --gold: #d99a2b;
  --water: #2f8e9f;
  --rose: #c86a73;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(13, 42, 32, 0.07);
  --shadow-md: 0 10px 30px rgba(13, 42, 32, 0.14);
  --shadow-lg: 0 20px 54px rgba(13, 42, 32, 0.18);
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a,
button {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
  min-height: 78px;
  padding: 0.85rem clamp(1rem, 4vw, 4.2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 237, 0.92);
  backdrop-filter: blur(16px);
}

.pta-mark,
.site-nav,
.hero-actions,
.download-actions,
.mobile-bar,
.resource-buttons {
  display: flex;
  align-items: center;
}

.pta-mark {
  gap: 0.55rem;
  color: var(--pine);
  text-decoration: none;
}

.pta-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 36px;
  border-radius: 999px;
  color: var(--white);
  background: var(--pine);
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 0;
}

.pta-name {
  font-weight: 700;
}

.header-logo {
  display: block;
  height: 48px;
  width: auto;
}

.site-nav {
  justify-content: center;
  gap: clamp(0.8rem, 2.6vw, 2rem);
}

.site-nav a {
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding: 6px 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.site-nav a:hover {
  border-bottom-color: var(--moss);
  color: var(--pine);
}

.header-cta,
.button,
.download-button,
.lesson-resource,
.site-footer a,
.mobile-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.header-cta {
  min-height: 2.65rem;
  padding: 0 1.2rem;
  color: var(--white);
  background: var(--pine);
  font-size: 14px;
}

.header-cta:hover {
  background: var(--deep-forest);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100svh - 78px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(3.2rem, 7vw, 6rem) clamp(1rem, 4vw, 4.2rem) clamp(5rem, 7vw, 6.5rem);
  color: var(--white);
  background: var(--pine);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 42, 32, 0.94) 0%, rgba(13, 42, 32, 0.86) 42%, rgba(13, 42, 32, 0.5) 100%),
    url("./assets/story/custom_victor_carbon_adventure.png") center right / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 9rem;
  background: linear-gradient(180deg, transparent, var(--ivory));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 56rem;
}

.kicker {
  margin: 0 0 0.75rem;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero .kicker {
  color: var(--bud);
}

h1,
h2,
h3,
p,
dl,
dd,
ol {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--pine);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.06em;
}

h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.18;
}

.hero h1 {
  color: var(--white);
  font-family: var(--serif);
}

.hero-subtitle {
  margin-bottom: 1.1rem;
  color: var(--bud);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 800;
  font-family: var(--sans);
}

.hero-copy {
  max-width: 46rem;
  margin-bottom: 1.7rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  line-height: 1.8;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.8rem;
}

.button {
  min-height: 3rem;
  padding: 0 1.4rem;
  font-size: 15px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--pine);
  background: var(--bud);
  box-shadow: var(--shadow-sm);
}

.button.primary:hover {
  background: #c9e383;
  color: var(--deep-forest);
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  max-width: 50rem;
  margin-bottom: 0;
}

.hero-stats div {
  min-height: 5.9rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
}

.hero-stats dt {
  margin-bottom: 0.35rem;
  color: var(--bud);
  font-size: 1.25rem;
  font-weight: 900;
}

.hero-stats dd {
  margin-left: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.45;
}

.hero-logo,
.hero-victor,
.hero-sophie {
  position: absolute;
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.22));
}

.hero-logo {
  right: clamp(1rem, 6vw, 6rem);
  bottom: 2rem;
  width: min(28vw, 19rem);
}

.hero-victor {
  right: clamp(11rem, 20vw, 23rem);
  bottom: 1.15rem;
  width: min(13vw, 8rem);
}

.hero-sophie {
  right: clamp(5rem, 12vw, 13rem);
  bottom: 0.7rem;
  width: min(12vw, 7rem);
}

/* ===== Sections ===== */
.audience-band,
.system-band,
.preview-band,
.downloads-band,
.guide-band,
.faq-band {
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 4.2rem);
}

.audience-band,
.downloads-band,
.faq-band {
  background: var(--white);
}

.system-band {
  background: linear-gradient(180deg, var(--tint), var(--ivory));
}

.preview-band {
  background: var(--ivory);
}

.guide-band {
  background: linear-gradient(180deg, rgba(47, 142, 159, 0.08), var(--white));
}

.section-head {
  max-width: 58rem;
  margin-bottom: 1.4rem;
}

.section-head.compact {
  max-width: 48rem;
}

.section-head h2 {
  margin-bottom: 0.55rem;
  color: var(--pine);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.35;
  font-family: var(--serif);
}

.section-head p:not(.kicker) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.audience-grid,
.system-grid,
.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.audience-grid article,
.system-lane,
.guide-steps article,
.download-card,
.lesson-stage,
.lesson-rail,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.audience-grid article,
.guide-steps article {
  min-height: 12rem;
  padding: 1.2rem;
}

.audience-grid span,
.guide-steps span {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: var(--water);
  font-weight: 900;
  font-size: 14px;
}

.audience-grid h3,
.guide-steps h3 {
  margin-bottom: 0.55rem;
  color: var(--pine);
  font-size: 1.25rem;
  font-family: var(--serif);
}

.audience-grid p,
.guide-steps p,
.system-lane p,
.system-lane li,
.faq-list p {
  color: var(--muted);
  line-height: 1.7;
}

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

.system-lane {
  padding: 1.3rem;
}

.system-lane strong {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--pine);
  font-size: 1.35rem;
  font-family: var(--serif);
}

.system-lane.accent strong {
  color: var(--water);
}

.system-lane ol {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0;
  padding-left: 1.25rem;
}

/* ===== Preview Tool ===== */
.preview-tool {
  display: grid;
  grid-template-columns: minmax(18rem, 23rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.lesson-rail {
  position: sticky;
  top: 5.6rem;
  padding: 1rem;
}

.grade-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.grade-button {
  min-height: 2.55rem;
  border-radius: 999px;
  color: var(--pine);
  background: transparent;
  font-weight: 900;
  font-size: 14px;
}

.grade-button.active {
  color: var(--white);
  background: var(--magic);
}

.grade-summary {
  margin: 0.9rem 0;
  padding: 0.9rem;
  border-radius: var(--radius);
  color: var(--pine);
  background: rgba(185, 217, 108, 0.25);
  line-height: 1.6;
  font-weight: 700;
  font-size: 14px;
}

.lesson-list {
  display: grid;
  gap: 0.45rem;
  max-height: 56vh;
  overflow: auto;
  padding-right: 0.1rem;
}

.lesson-tab {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.65rem;
  width: 100%;
  min-height: 4rem;
  padding: 0.7rem;
  border: 1px solid rgba(13, 42, 32, 0.11);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  background: var(--white);
  cursor: pointer;
}

.lesson-tab.active {
  border-color: var(--magic);
  background: linear-gradient(90deg, rgba(78, 155, 60, 0.1), var(--white));
}

.lesson-no {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--magic);
  font-weight: 900;
  font-size: 13px;
}

.lesson-tab strong {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--pine);
  line-height: 1.25;
  font-family: var(--serif);
  font-size: 15px;
}

.lesson-tab small {
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}

.lesson-stage {
  min-height: 45rem;
  overflow: hidden;
}

/* ===== Lesson Hero ===== */
.lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(17rem, 0.95fr);
  gap: 1.2rem;
  padding: 1.2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--white), var(--tint));
}

.lesson-copy h3 {
  margin-bottom: 0.45rem;
  color: var(--pine);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.3;
  font-family: var(--serif);
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.lesson-meta span,
.lesson-pill,
.path-time,
.resource-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.62rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.lesson-meta span {
  color: var(--pine);
  background: var(--tint);
}

.lesson-question {
  margin-bottom: 1rem;
  color: var(--pine);
  font-size: 1.08rem;
  line-height: 1.7;
  font-weight: 700;
}

.lesson-focus,
.lesson-activity {
  margin-bottom: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

.lesson-resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.lesson-resource {
  min-height: 2.45rem;
  padding: 0 1rem;
  color: var(--white);
  background: var(--pine);
  font-size: 14px;
  border-radius: 999px;
}

.lesson-resource:hover {
  background: var(--deep-forest);
}

.lesson-resource.secondary {
  color: var(--pine);
  border: 1px solid var(--line);
  background: var(--white);
}

.lesson-resource.secondary:hover {
  background: var(--tint);
}

.lesson-resource.story-btn {
  color: var(--pine);
  background: var(--bud);
}

.lesson-resource.story-btn:hover {
  background: #c9e383;
}

.lesson-image-wrap {
  position: relative;
  min-height: 18rem;
}

.lesson-image {
  width: 100%;
  height: 100%;
  min-height: 18rem;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.lesson-character {
  position: absolute;
  right: 0.6rem;
  bottom: -0.5rem;
  width: 5rem;
  height: 6rem;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px rgba(13, 42, 32, 0.18));
}

/* ===== Path & Detail ===== */
.path-section,
.detail-section {
  padding: 1.2rem;
}

.section-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.path-section h4,
.detail-section h4 {
  margin: 0 0 0.9rem;
  color: var(--pine);
  font-size: 1.25rem;
  font-family: var(--serif);
}

.path-list {
  display: grid;
  gap: 0.65rem;
}

.path-item {
  display: grid;
  grid-template-columns: 5.8rem 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.path-time {
  justify-content: center;
  color: var(--white);
  background: var(--moss);
  text-align: center;
  font-size: 12px;
}

.path-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--pine);
  font-family: var(--serif);
}

.path-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.detail-card {
  min-height: 9.8rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tint);
}

.detail-card strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--pine);
  font-family: var(--serif);
}

.detail-card p,
.detail-card li {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.detail-card ul {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding-left: 1.15rem;
}

/* ===== Downloads ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.download-card {
  display: grid;
  gap: 0.9rem;
  min-height: 15rem;
  padding: 1rem;
}

.download-card h3 {
  margin-bottom: 0.45rem;
  color: var(--pine);
  font-size: 1.15rem;
  font-family: var(--serif);
}

.download-card p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.resource-tag {
  color: var(--water);
  background: rgba(47, 142, 159, 0.1);
}

.resource-buttons {
  align-self: end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.download-button {
  min-height: 2.45rem;
  padding: 0 1rem;
  color: var(--white);
  background: var(--pine);
  font-size: 14px;
  border-radius: 999px;
}

.download-button:hover {
  background: var(--deep-forest);
}

.download-button.light {
  color: var(--pine);
  border: 1px solid var(--line);
  background: var(--white);
}

.download-button.light:hover {
  background: var(--tint);
}

.guide-steps article:nth-child(2) span {
  color: var(--gold);
}

.guide-steps article:nth-child(3) span {
  color: var(--rose);
}

/* ===== FAQ ===== */
.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 64rem;
}

.faq-list details {
  padding: 1rem;
}

.faq-list summary {
  color: var(--pine);
  font-weight: 900;
  cursor: pointer;
  font-family: var(--serif);
}

.faq-list p {
  margin: 0.65rem 0 0;
  font-size: 15px;
}

/* ===== Footer ===== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem clamp(1rem, 4vw, 4.2rem);
  color: #b8c9ae;
  background: var(--deep-forest);
}

.site-footer strong {
  color: var(--white);
}

.site-footer p {
  margin: 0.25rem 0 0;
  font-size: 13px;
}

.site-footer a {
  min-height: 2.4rem;
  padding: 0 1rem;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 14px;
}

.site-footer a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-bar {
  display: none;
}

/* ===== Preview Modal ===== */
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(13, 42, 32, 0.65);
  backdrop-filter: blur(4px);
}

.preview-modal.active {
  display: flex;
}

.preview-modal-inner {
  position: relative;
  width: min(900px, 92vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.preview-modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.preview-modal-header h3 {
  margin: 0;
  color: var(--pine);
  font-family: var(--serif);
  font-size: 1.2rem;
}

.preview-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--tint);
  color: var(--pine);
  font-size: 1.2rem;
  font-weight: 900;
}

.preview-modal-close:hover {
  background: var(--line);
}

.preview-modal-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.2rem;
  padding: 1.2rem;
}

.preview-modal-info h4 {
  margin: 0 0 0.5rem;
  color: var(--pine);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.preview-modal-info p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.preview-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-modal-cover {
  text-align: center;
}

.preview-modal-cover img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.preview-modal-cover .story-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.75rem;
  min-height: 2.6rem;
  border-radius: 999px;
  background: var(--bud);
  color: var(--pine);
  font-size: 14px;
  font-weight: 800;
}

.preview-modal-cover .story-link-btn:hover {
  background: #c9e383;
}

.preview-modal-cover .story-link-btn::before {
  content: "🎧";
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
    overflow: auto;
    padding-bottom: 0.2rem;
  }

  .hero-logo,
  .hero-victor,
  .hero-sophie {
    opacity: 0.62;
  }

  .preview-tool,
  .lesson-hero {
    grid-template-columns: 1fr;
  }

  .lesson-rail {
    position: static;
  }

  .lesson-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

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

  .preview-modal-body {
    grid-template-columns: 1fr;
  }

  .preview-modal-cover {
    order: -1;
  }

  .preview-modal-cover img {
    height: 160px;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 4rem;
    padding: 0.7rem 1rem;
  }

  .site-nav,
  .header-cta {
    display: none;
  }

  .header-logo {
    height: 38px;
  }

  .hero {
    min-height: 43rem;
    padding: 4rem 1rem 5.5rem;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(13, 42, 32, 0.95) 0%, rgba(13, 42, 32, 0.82) 52%, rgba(13, 42, 32, 0.62) 100%),
      url("./assets/story/custom_victor_carbon_adventure.png") center bottom / cover no-repeat;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-stats,
  .audience-grid,
  .system-grid,
  .guide-steps,
  .lesson-list,
  .download-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: 11rem;
    right: 1rem;
    bottom: 1.4rem;
  }

  .hero-victor {
    display: none;
  }

  .hero-sophie {
    right: 12rem;
    width: 4.4rem;
  }

  .audience-band,
  .system-band,
  .preview-band,
  .downloads-band,
  .guide-band,
  .faq-band {
    padding: 2.4rem 1rem;
  }

  .preview-tool {
    gap: 0.75rem;
  }

  .lesson-stage {
    min-height: 0;
  }

  .lesson-image-wrap {
    min-height: 13rem;
  }

  .lesson-image {
    min-height: 13rem;
  }

  .path-item {
    grid-template-columns: 1fr;
  }

  .path-time {
    justify-content: flex-start;
    width: fit-content;
  }

  .site-footer {
    display: block;
    padding-bottom: 4.8rem;
  }

  .site-footer a {
    margin-top: 1rem;
  }

  .mobile-bar {
    position: fixed;
    inset: auto 1rem 0.8rem;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.45rem;
    border: 1px solid rgba(13, 42, 32, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
  }

  .mobile-bar a {
    min-height: 2.65rem;
    color: var(--white);
    background: var(--pine);
    font-size: 14px;
  }
}


/* ===== 文件预览弹窗（PPT 逐页 / 任务单 PDF） ===== */
.preview-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 0 24px 20px;
}
.preview-modal-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  flex: 1 1 260px;
}
.flipbook {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 56px;
}
.flip-page {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  object-fit: contain;
}
.flip-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--pine);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, background 0.2s;
}
.flip-prev { left: 8px; }
.flip-next { right: 8px; }
.flip-nav:disabled { opacity: 0.3; cursor: default; }
.flip-nav:not(:disabled):hover { background: var(--deep-forest); }
.flip-counter {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.pdf-frame {
  width: 100%;
  height: 62vh;
  border: 0;
  border-radius: 8px;
  background: var(--white);
}
@media (max-width: 720px) {
  .flipbook { padding: 0 44px; }
  .pdf-frame { height: 56vh; }
}


/* ===== 移动端选课：收起课次列表 ===== */
.back-to-list {
  display: none;
}
@media (max-width: 1120px) {
  .preview-tool.lesson-selected .lesson-rail {
    display: none;
  }
  .preview-tool.lesson-selected .back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--tint);
    color: var(--pine);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
  }
  .preview-tool.lesson-selected .back-to-list:hover {
    background: var(--bud);
  }
}
