:root {
  color-scheme: light;
  --ink: #17343a;
  --muted: #607479;
  --paper: #f7f5ee;
  --surface: #ffffff;
  --forest: #155c52;
  --forest-dark: #0d423c;
  --aqua: #dcefea;
  --sky: #dcecf2;
  --sun: #dd9f3f;
  --sun-light: #f5dfb4;
  --line: #cddbd7;
  --shadow: 0 18px 50px rgb(23 52 58 / 10%);
  --radius-lg: 24px;
  --radius-md: 16px;
  --content: 1180px;
  --font-sans: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-serif: "Noto Serif TC", "PMingLiU", serif;
  --text-caption: 0.8125rem;
  --text-body: 1rem;
  --text-h3: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --text-h2: clamp(1.65rem, 1.48rem + 0.75vw, 2.3rem);
  --text-h1: clamp(2.05rem, 1.72rem + 1.5vw, 3.2rem);
  --text-hero: var(--text-h1);
  --text-section: var(--text-h2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
}

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

a {
  color: var(--forest);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--forest-dark);
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  color: #fff;
  background: var(--forest-dark);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.site-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 2.25rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--forest);
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  min-height: 0;
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.library-hero__media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  min-height: 15.5rem;
  max-height: 17.5rem;
  margin: 0;
  background: var(--aqua);
}

.library-hero__media::after {
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(0deg, rgb(5 34 35 / 70%), transparent);
  content: "";
  pointer-events: none;
}

.library-hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.library-hero__media figcaption {
  position: absolute;
  z-index: 1;
  right: 1.25rem;
  bottom: 1rem;
  left: 1.25rem;
  color: rgb(255 255 255 / 88%);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
}

.library-hero__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding-block: 1.1rem;
  padding-inline: clamp(1.5rem, 3.5vw, 3rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--sun);
  font-size: var(--text-caption);
  font-weight: 900;
  letter-spacing: 0.16em;
}

.library-hero h1 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.library-hero h1 span {
  display: block;
  white-space: nowrap;
}

.library-hero__lead {
  max-width: 29rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

.teacher-credit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin: 1rem 0 0;
}

.teacher-credit__label {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.teacher-credit strong {
  font-size: 1rem;
  font-weight: 900;
}

.library-hero .teacher-credit__label {
  color: #7d3f62;
  background: #f8e9f0;
}

.lesson-hero .teacher-credit {
  color: #fff;
}

.lesson-hero .teacher-credit__label {
  color: #fff;
  background: rgb(255 255 255 / 16%);
}

.teacher-credit--footer {
  margin: 0;
}

.site-footer .teacher-credit__label,
.lesson-footer .teacher-credit__label {
  color: var(--forest);
  background: #edf5f1;
}

.reading-guide {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, 1fr);
  margin-block: 1.25rem 2.5rem;
  border-block: 1px solid var(--line);
}

.reading-guide__intro,
.reading-guide__item {
  min-width: 0;
  padding: 1.25rem clamp(0.9rem, 2vw, 1.5rem);
}

.reading-guide__intro {
  padding-left: 0;
}

.reading-guide__intro h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  line-height: 1.3;
}

.reading-guide__item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.75rem;
  border-left: 1px solid var(--line);
}

.reading-guide__item > span {
  color: #a8661f;
  font-family: var(--font-serif);
  font-weight: 800;
}

.reading-guide__item h3,
.reading-guide__item p {
  margin: 0;
}

.reading-guide__item h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
}

.reading-guide__item p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.browser-panel {
  margin-block: 0 3.75rem;
}

.browser-panel__heading,
.section-heading--inline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.browser-panel__heading {
  padding-block: 1.25rem;
  border-block: 3px solid var(--ink);
}

.browser-panel__heading h2,
.section-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-section);
  line-height: 1.25;
}

.browser-panel__heading > p,
.section-heading--inline > p {
  max-width: 25rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.topic-tools {
  margin-top: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.search-field {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.65rem 0;
  border: 0;
  border-bottom: 1px solid #8ca39f;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
}

.search-field input:focus {
  border-bottom-color: var(--forest);
}

.category-filter {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.85rem 0 0.25rem 8rem;
  scrollbar-width: thin;
}

.category-filter button {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

.category-filter button[aria-pressed="true"] {
  border-bottom-color: var(--forest);
  color: var(--forest-dark);
  background: var(--aqua);
}

.result-count {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.topic-section {
  margin-block: 3.75rem;
}

.section-heading {
  margin-bottom: 1.75rem;
}

.topic-list {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.topic-list--catalog {
  margin-top: 1rem;
  padding-top: 1rem;
}

.topic-card {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  overflow: hidden;
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 180ms ease;
}

.topic-card:hover,
.topic-card:focus-within {
  border-color: var(--forest);
}

.topic-card--featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  margin-bottom: 1.5rem;
  border-top-width: 3px;
}

.topic-card--featured .topic-card__body {
  min-height: 18rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: #fbfaf6;
}

.topic-card--featured .topic-card__image-link img {
  height: 18rem;
  aspect-ratio: auto;
}

.topic-card__image-link {
  display: block;
  min-height: 0;
  background: var(--aqua);
}

.topic-card__image-link img {
  width: 100%;
  height: 17rem;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 280ms ease;
}

.topic-card:hover .topic-card__image-link img,
.topic-card:focus-within .topic-card__image-link img {
  transform: scale(1.025);
}

.topic-card__body {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 18rem;
  padding: clamp(1.1rem, 2.3vw, 1.6rem) clamp(1rem, 2vw, 1.5rem) 0;
  overflow-wrap: anywhere;
}

.topic-card__category {
  margin: 0 0 0.45rem;
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 850;
}

.topic-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-h3);
  line-height: 1.35;
}

.topic-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.topic-card h3 a:hover {
  color: var(--forest);
}

.topic-card__summary {
  margin: 0.8rem 0;
  max-width: 62ch;
  color: var(--muted);
}

.topic-card__meta {
  margin: 0;
  color: #7a6a52;
  font-size: 0.82rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  color: var(--forest-dark);
  background: var(--aqua);
  font-size: 0.78rem;
  font-weight: 700;
}

.topic-card__badge {
  align-self: flex-start;
  margin: 0 0 0.65rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0;
  color: #67420d;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.topic-card__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 2.75rem;
  margin-top: auto;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--forest);
  border-radius: 0;
  color: var(--forest);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

.topic-card__cta:hover {
  color: var(--forest-dark);
  border-bottom-color: var(--forest-dark);
}

.status-message,
.fallback-entry noscript section {
  display: block;
  padding: 1.25rem;
  border: 1px dashed #9bb8b1;
  border-radius: var(--radius-md);
  background: #f1f8f6;
}

.status-message[hidden] {
  display: none;
}

.status-message--error {
  color: #792f2f;
  border-color: #d6a1a1;
  background: #fff1ef;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 6rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .library-hero,
  .topic-list,
  .topic-card--featured {
    grid-template-columns: 1fr;
  }

  .library-hero__media {
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .topic-card--featured {
    grid-column: auto;
    margin-bottom: 0;
  }

  .topic-card--featured .topic-card__body {
    min-height: auto;
    padding: 1.5rem 1.25rem;
  }

  .topic-card--featured .topic-card__image-link img {
    height: 15rem;
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 760px) {
  .site-header,
  .browser-panel__heading,
  .section-heading--inline,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header p {
    display: none;
  }

  .library-hero {
    margin-top: 1rem;
  }

  .library-hero__copy {
    padding: 1.75rem 1.25rem 2rem;
  }

  .library-hero__photo {
    object-position: 62% center;
  }

  .reading-guide {
    grid-template-columns: 1fr;
    margin-block: 1.25rem 3.5rem;
  }

  .reading-guide__intro {
    padding: 1.25rem 0;
  }

  .reading-guide__item {
    padding-inline: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .search-field {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .category-filter {
    padding-left: 0;
  }

  .topic-card__image-link img,
  .topic-card--featured .topic-card__image-link img {
    height: 13rem;
    aspect-ratio: 16 / 9;
  }

  .topic-card__body {
    min-height: auto;
  }

}

/* 第 006 章：觀光資源到旅遊產品 */
.product-design-lesson {
  --product-plum: #6b315f;
  --product-rose: #a65082;
  --product-coral: #d57655;
  --product-cream: #fff8f2;
  --product-teal: #287e75;
}

.product-design-hero {
  color: #fff;
  background: linear-gradient(135deg, #54244d 0%, #7a396c 58%, #a65082 100%);
}

.product-design-hero > *,
.product-design-hero__image,
.product-design-lesson .publication-layout > * {
  min-width: 0;
}

.product-design-hero img {
  max-width: 100%;
  height: auto;
}

.product-design-lesson .eyebrow,
.product-design-lesson .trend-card h3,
.product-design-lesson .section-subtitle {
  color: var(--product-plum);
}

.product-design-lesson .lesson-section > header {
  max-width: 58rem;
}

.chapter-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: -1.1rem 0 2.5rem;
  padding: 1rem;
  border: 1px solid #ead6e2;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 10px 30px rgb(76 34 69 / 6%);
}

.chapter-jump a {
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  color: var(--product-plum);
  background: #f7eaf1;
  font-size: 0.88rem;
  font-weight: 800;
}

.product-design-lesson .visual-figure--wide {
  max-width: 1050px;
}

.product-blueprint,
.planning-canvas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.product-blueprint article,
.planning-canvas article,
.sales-copy-grid article {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid #ead6e2;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 8px 24px rgb(76 34 69 / 5%);
}

.product-blueprint span {
  color: var(--product-coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.product-blueprint h3,
.planning-canvas h3,
.sales-copy-grid h3 {
  margin: 0.35rem 0 0.55rem;
  color: var(--product-plum);
  font-family: var(--font-serif);
}

.world-heritage-feature {
  border-color: #ead6e2;
  background: #fffafc;
}

.heritage-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.85fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  margin-block: 1.5rem 2.5rem;
}

.heritage-lead figure {
  margin: 0;
}

.heritage-lead img,
.heritage-site-layout img {
  width: 100%;
  border-radius: var(--radius-md);
}

.heritage-lead figcaption,
.heritage-site-layout figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.heritage-stats p {
  margin: 0;
  padding: 0.8rem 0.45rem;
  border-radius: 16px;
  text-align: center;
  background: #f1d9e7;
}

.heritage-stats strong,
.heritage-stats span {
  display: block;
}

.heritage-stats strong {
  color: var(--product-plum);
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.heritage-stats span {
  color: #705c6b;
  font-size: 0.78rem;
}

.section-subtitle {
  margin: 2.2rem 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
}

.case-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 6px solid var(--product-rose);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: #f8eaf2;
}

.case-heading > span {
  flex: 0 0 auto;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  color: #fff;
  background: var(--product-plum);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.case-heading h3,
.case-heading p {
  margin: 0;
}

.case-heading h3 {
  color: var(--product-plum);
  font-family: var(--font-serif);
  font-size: 1.45rem;
}

.case-heading p {
  margin-top: 0.3rem;
  color: var(--muted);
}

.case-divider {
  height: 1px;
  margin: 3.5rem 0;
  background: linear-gradient(90deg, transparent, #d7a9c4 15%, #d7a9c4 85%, transparent);
}

.polar-layout img,
.food-layout img,
.polar-ice-figure img {
  width: 100%;
  border-radius: var(--radius-md);
}

.polar-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-block: 1.5rem 2.5rem;
}

.polar-product-grid article {
  padding: 1rem;
  border: 1px solid #c9dfe5;
  border-radius: var(--radius-md);
  background: #edf7f8;
}

.polar-product-grid span {
  color: #297079;
  font-size: 0.76rem;
  font-weight: 900;
}

.polar-product-grid h3 {
  margin: 0.35rem 0;
  color: #245760;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.polar-map-layout .publication-figure {
  align-self: center;
}

.polar-ice-figure {
  max-width: 920px;
  margin: 2rem auto;
}

.polar-ice-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.food-product-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr) auto);
  gap: 0.55rem;
  align-items: center;
  margin-block: 1.5rem;
}

.food-product-flow article {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #efd2bd;
  border-radius: var(--radius-md);
  background: #fff3e9;
}

.food-product-flow article:last-child {
  grid-column: 7;
}

.food-product-flow span {
  display: inline-grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--product-coral);
  font-size: 0.78rem;
  font-weight: 900;
}

.food-product-flow h3 {
  margin: 0.45rem 0 0.25rem;
  color: #773d2d;
  font-family: var(--font-serif);
}

.food-product-flow p {
  margin: 0;
  color: #6c554d;
  font-size: 0.88rem;
}

.food-product-flow > b {
  color: var(--product-coral);
  font-size: 1.45rem;
}

.heritage-trends {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.heritage-chart-layout,
.heritage-site-layout {
  margin-top: 2.5rem;
}

.heritage-chart-layout .publication-figure--reading img {
  width: 100%;
}

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

.sales-copy-grid article:nth-child(2) {
  background: #f8e8f1;
}

.sales-copy-grid article:nth-child(3) {
  background: #e7f3ef;
}

@media (max-width: 760px) {
  .product-design-hero {
    width: 100%;
    min-width: 0;
    padding: 1.35rem;
  }

  .product-design-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .product-design-hero .lesson-meta li {
    max-width: 100%;
    white-space: normal;
  }

  .product-blueprint,
  .planning-canvas,
  .sales-copy-grid,
  .heritage-lead {
    grid-template-columns: 1fr;
  }

  .polar-product-grid,
  .food-product-flow {
    grid-template-columns: 1fr;
  }

  .food-product-flow article:last-child {
    grid-column: auto;
  }

  .food-product-flow > b {
    text-align: center;
    transform: rotate(90deg);
  }

  .case-heading {
    flex-direction: column;
  }

  .heritage-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .world-heritage-feature {
    padding-inline: 1rem;
  }

  .product-design-lesson .publication-figure--wide,
  .product-design-lesson .publication-figure--reading {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-design-lesson .publication-figure--wide .publication-zoom,
  .product-design-lesson .publication-figure--reading .publication-zoom {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .heritage-chart-layout .publication-figure--reading img {
    width: 620px;
    max-width: none;
  }
}

@media (max-width: 360px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 1rem), var(--content));
  }

  .library-hero h1 span {
    white-space: normal;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* 章節共用版型 */
.lesson-body {
  background:
    linear-gradient(180deg, rgb(220 239 234 / 45%), transparent 32rem),
    var(--paper);
  font-size: 1rem;
  line-height: 1.7;
}

.lesson-header,
.lesson-main,
.lesson-footer {
  width: min(calc(100% - 2rem), 1040px);
  margin-inline: auto;
}

.lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.lesson-header a {
  font-weight: 800;
}

.lesson-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(15rem, 0.7fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--forest-dark);
  box-shadow: var(--shadow);
}

.lesson-hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-h1);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.lesson-hero__lead {
  color: rgb(255 255 255 / 82%);
  font-size: 1.05rem;
}

.lesson-hero__image {
  width: min(100%, 21rem);
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 8%);
}

.lesson-hero__image img {
  width: 100%;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.lesson-meta li {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  color: var(--sun-light);
  font-size: 0.8rem;
  font-weight: 800;
}

.lesson-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.5rem 3.25rem;
}

.overview-card,
.core-question,
.practice-panel,
.discussion-panel,
.source-panel {
  padding: clamp(1.15rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.overview-card h2,
.core-question h2,
.practice-panel h2,
.discussion-panel h2,
.source-panel h2 {
  margin-top: 0;
  font-family: var(--font-serif);
}

.core-question {
  grid-column: 1 / -1;
  border-color: #d3b26f;
  background: var(--sun-light);
}

.lesson-section {
  margin-block: 3.75rem;
  scroll-margin-top: 2rem;
}

.lesson-section > header {
  max-width: 50rem;
  margin-bottom: 1.4rem;
}

.lesson-section h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  line-height: 1.25;
}

.lesson-section__intro {
  color: var(--muted);
  font-size: 1rem;
}

.visual-figure {
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 0;
}

.visual-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 12px 35px rgb(23 52 58 / 8%);
}

.visual-figure figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.case-grid,
.comparison-grid,
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}

.case-card,
.comparison-card,
.scenario-card {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.case-card h3,
.comparison-card h3,
.scenario-card h3 {
  margin-top: 0;
  color: var(--forest-dark);
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.fact-list,
.check-list {
  padding-left: 1.25rem;
}

.fact-list li,
.check-list li {
  margin-block: 0.45rem;
}

.practice-panel {
  border-left: 8px solid var(--forest);
  background: #eef7f4;
}

.discussion-panel {
  border-left: 8px solid var(--sun);
  background: #fff8e9;
}

.source-panel {
  background: #f3f5f4;
}

/* 職涯章：紫粉色系，保留共用閱讀版型 */
.career-lesson {
  --forest: #7d3f82;
  --forest-dark: #4b214f;
  --aqua: #f3e4ef;
  --sky: #eee7f6;
  --sun: #c75b8c;
  --sun-light: #f5dbe7;
  --line: #decbd8;
  background:
    linear-gradient(180deg, rgb(243 228 239 / 58%), transparent 34rem),
    var(--paper);
}

.career-lesson .core-question {
  border-color: #d7a8c2;
  background: #fff1f7;
}

.career-lesson .evidence-note {
  border-left-color: #a84c79;
  background: #fcf5f9;
}

/* 高雄章：刊物導讀與緊湊圖像版型 */
.kaohsiung-lesson {
  --kaohsiung-plum: #4b214f;
  --kaohsiung-purple: #7d3f82;
  --kaohsiung-rose: #c3548d;
  --kaohsiung-blush: #f8eaf2;
  --kaohsiung-lavender: #f1eafa;
  --ink: #38283d;
  --muted: #6d5a70;
  --paper: #fdf9fc;
  --forest: var(--kaohsiung-purple);
  --forest-dark: var(--kaohsiung-plum);
  --sun: var(--kaohsiung-rose);
  --sun-light: #f5dce9;
  --line: #e2cddd;
  --shadow: 0 18px 50px rgb(75 33 79 / 12%);
  background:
    radial-gradient(circle at 15% 0%, rgb(248 234 242 / 92%), transparent 30rem),
    linear-gradient(180deg, rgb(241 234 250 / 70%), transparent 38rem),
    var(--paper);
}

.kaohsiung-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  min-height: 0;
  padding: clamp(1.6rem, 3.5vw, 2.75rem);
  background: linear-gradient(
    135deg,
    var(--kaohsiung-plum) 0%,
    #713565 58%,
    #9c4d7d 100%
  );
}

.kaohsiung-hero h1 {
  max-width: 12em;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.06;
}

.kaohsiung-hero h1 span {
  display: block;
  white-space: nowrap;
}

.kaohsiung-hero__image img {
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.kaohsiung-hero__image figcaption {
  padding: 0.6rem 0.8rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.76rem;
  line-height: 1.5;
}

.kaohsiung-lesson .lesson-overview {
  margin-block: 1.5rem 3.5rem;
}

.kaohsiung-lesson .overview-card--wide {
  grid-column: 1 / -1;
  border-color: #dec4d5;
  background: linear-gradient(135deg, #fff 0%, var(--kaohsiung-blush) 100%);
}

.kaohsiung-lesson .core-question {
  border-color: #dca8c3;
  background: var(--kaohsiung-blush);
}

.publication-feature {
  margin-block: 2.75rem 4rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid #dfc6d8;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fffafd, var(--kaohsiung-lavender));
}

.publication-feature > header {
  max-width: 52rem;
  margin-bottom: 1.5rem;
}

.publication-feature h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  line-height: 1.25;
}

.publication-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  max-width: 52rem;
  margin-top: 2rem;
  margin-inline: auto;
}

.publication-copy h3 {
  margin-top: 0;
  color: var(--forest-dark);
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.publication-timeline {
  margin: 0;
}

.publication-timeline div {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.publication-timeline dt {
  color: var(--forest-dark);
  font-weight: 900;
}

.publication-timeline dd {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.publication-figure {
  margin: 0;
}

.publication-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dbc1d3;
  border-radius: 0.85rem;
  background: #fff;
}

.publication-zoom {
  display: block;
  border-radius: 0.85rem;
  cursor: zoom-in;
}

.publication-zoom:focus-visible {
  outline: 3px solid var(--kaohsiung-rose);
  outline-offset: 4px;
}

.publication-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.publication-figure--wide {
  max-width: 980px;
  margin-inline: auto;
}

.publication-figure--reading {
  max-width: 820px;
  margin-top: 2rem;
  margin-inline: auto;
}

.kaohsiung-lesson .visual-figure--compact {
  max-width: 800px;
  margin-inline: auto;
}

.kaohsiung-lesson .visual-figure--diagram {
  max-width: 960px;
}

.kaohsiung-lesson .visual-figure--photo {
  max-width: 760px;
}

.kaohsiung-lesson .practice-panel,
.kaohsiung-lesson .evidence-note {
  border-left-color: var(--kaohsiung-purple);
  background: #fbf5fa;
}

.kaohsiung-lesson .discussion-panel,
.kaohsiung-lesson .evidence-note[data-evidence="inference"] {
  border-left-color: var(--kaohsiung-rose);
  background: #fff4f8;
}

.kaohsiung-lesson .evidence-note[data-evidence="scenario"] {
  border-left-color: var(--kaohsiung-purple);
  background: var(--kaohsiung-lavender);
}

.kaohsiung-lesson [data-evidence="inference"] .evidence-label {
  background: #a54176;
}

.kaohsiung-lesson [data-evidence="scenario"] .evidence-label,
.kaohsiung-lesson .evidence-label {
  background: var(--kaohsiung-purple);
}

.kaohsiung-lesson .trend-number {
  color: #a54176;
}

.source-details {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.source-details summary {
  padding: 1rem 1.1rem;
  color: var(--forest);
  font-weight: 800;
  cursor: pointer;
}

.source-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.source-details .fact-list {
  margin: 1rem 1.1rem 1.2rem;
}

.source-panel a::after {
  content: " ↗";
}

.source-cutoff {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.as-of {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  color: #6a4a16;
  background: var(--sun-light);
  font-size: 0.78rem;
  font-weight: 850;
}

.evidence-note {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--forest);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: #f7fbfa;
}

.evidence-note[data-evidence="inference"] {
  border-left-color: #c8842c;
  background: #fff9ee;
}

.evidence-note[data-evidence="scenario"] {
  border-left-color: #537aa1;
  background: #f2f7fb;
}

.evidence-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  color: #fff;
  background: var(--forest);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

[data-evidence="inference"] .evidence-label {
  background: #a8661f;
}

[data-evidence="scenario"] .evidence-label {
  background: #42698f;
}

.evidence-note p:last-child,
.trend-card p:last-child {
  margin-bottom: 0;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.trend-card {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 8px 24px rgb(23 52 58 / 5%);
}

.trend-card h3 {
  margin: 0.35rem 0 0.7rem;
  color: var(--forest-dark);
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.trend-number {
  color: #a8661f;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.table-wrap {
  overflow-x: auto;
  margin-block: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.lesson-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
}

.lesson-table th,
.lesson-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.lesson-table th {
  color: #fff;
  background: var(--forest-dark);
}

.lesson-table tr:last-child td {
  border-bottom: 0;
}

.decision-rule {
  margin-block: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--forest-dark);
}

.decision-rule strong {
  color: var(--sun-light);
}

.back-to-top {
  position: fixed;
  z-index: 30;
  right: max(1rem, calc((100vw - 1180px) / 2));
  bottom: 1rem;
  min-width: 3rem;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--forest-dark);
  box-shadow: var(--shadow);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.lesson-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .lesson-header,
  .lesson-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .lesson-hero__image {
    width: 100%;
    justify-self: stretch;
  }

  .core-question {
    grid-column: auto;
  }

  .kaohsiung-hero,
  .publication-layout {
    grid-template-columns: 1fr;
  }

  .kaohsiung-hero {
    padding: 1.5rem;
  }

  .kaohsiung-hero h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.25rem);
  }

  .kaohsiung-hero h1 span {
    white-space: normal;
  }

  .kaohsiung-hero__image img {
    aspect-ratio: 16 / 9;
  }

  .publication-feature {
    margin-block: 2.5rem 4rem;
    padding: 1.15rem;
  }

  .publication-zoom {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--kaohsiung-rose) var(--kaohsiung-blush);
  }

  .publication-figure--wide img {
    width: 760px;
    max-width: none;
  }

  .publication-figure--reading img {
    width: 620px;
    max-width: none;
  }
}


/* 教材切換導覽 */
.course-return-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 3px 12px rgb(23 52 58 / 8%);
}

.course-return-nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
  padding-block: 0.5rem;
}

.course-return-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.course-return-nav a.course-return-nav__primary {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.course-return-nav a:hover {
  border-color: var(--forest-dark);
  background: var(--aqua);
}

.course-return-nav a.course-return-nav__primary:hover {
  background: var(--forest-dark);
}

body:has(.course-return-nav) [id] {
  scroll-margin-top: 6rem;
}

@media (max-width: 360px) {
  .course-return-nav a {
    padding-inline: 0.625rem;
    font-size: 0.875rem;
  }
}

@media print {
  .course-return-nav {
    display: none;
  }
}

/* 國家公園影片：指定真實照片，圖片與框架使用同一比例。 */
.topic-card--featured.topic-card--park-video {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: center;
}
.topic-card--park-video .topic-card__image-link {
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  line-height: 0;
}
.topic-card--park-video .topic-card__image-link img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}
.lesson-hero__image--park-video {
  margin: 0;
}
.lesson-hero__image--park-video > a {
  display: block;
  line-height: 0;
}
.lesson-hero__image--park-video img {
  display: block;
  width: 100%;
  height: auto;
}
.lesson-hero__image--park-video figcaption {
  padding: 0.7rem 0.85rem;
  background: rgb(0 0 0 / 20%);
  font-size: 0.875rem;
  line-height: 1.5;
}
.lesson-hero__image--park-video figcaption a {
  color: #fff;
  text-underline-offset: 0.2em;
}
@media (max-width: 1100px) {
  .topic-card--featured.topic-card--park-video {
    grid-template-columns: 1fr;
  }
  .topic-card--park-video .topic-card__image-link {
    max-width: 42rem;
    justify-self: center;
  }
}

/* 首頁專題照片：統一 3:2，焦點圖片與下方左欄對齊。 */
.topic-list--catalog .topic-card__image-link {
  width: 100%;
  max-width: none;
  aspect-ratio: 3 / 2;
  align-self: start;
  overflow: hidden;
  line-height: 0;
}
.topic-list--catalog .topic-card__image-link img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

/* 國家公園章節影片圖：放大並裁去原縮圖上下黑邊。 */
.lesson-hero__image--park-video {
  width: 100%;
  max-width: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.lesson-hero__image--park-video > a {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.lesson-hero__image--park-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (min-width: 761px) {
  .lesson-hero--park-video {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.25rem, 3vw, 2rem);
  }
}

/* 第 006 章最終覆蓋：置於共用章節樣式之後，保留紫紅產品設計識別。 */
.product-design-lesson .product-design-hero,
.product-design-lesson .decision-rule {
  background: linear-gradient(135deg, #54244d 0%, #763667 60%, #9f4c7d 100%);
}

.product-design-lesson .product-design-hero .eyebrow {
  color: #f8d7e8;
}

.product-design-lesson .lesson-table th {
  background: #6b315f;
}

.product-design-lesson .back-to-top {
  background: #6b315f;
}
