:root {
  color-scheme: light;
  --ink: #202428;
  --muted: #717980;
  --line: #d9dcdc;
  --paper: #f5f6f6;
  --surface: #ffffff;
  --header-line: #72777a;
  --tile-copy: #52595e;
  --chapter-copy: #555c60;
  --prose-copy: #2d3439;
  --soft-copy: #4b5359;
  --manifesto-copy: #3c454b;
  --bronze: #9b6125;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf1ef;
  --muted: #b0b8b8;
  --line: #394145;
  --paper: #121518;
  --surface: #1a1e21;
  --header-line: #697276;
  --tile-copy: #c7cecf;
  --chapter-copy: #cbd2d3;
  --prose-copy: #e2e7e6;
  --soft-copy: #cbd2d3;
  --manifesto-copy: #d7dedd;
  --bronze: #d4a169;
}

html[data-theme="dark"] .brand img { filter: invert(1); }

html[data-theme="dark"] .inline-glyph {
  filter: invert(1);
  mix-blend-mode: screen;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

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

.site-shell {
  width: min(1420px, calc(100% - 56px));
  margin: 0 auto;
}

.site-header {
  min-height: 138px;
  display: flex;
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid var(--header-line);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
}

.brand img {
  display: block;
  width: 74px;
  height: 76px;
  object-fit: contain;
}

.brand-copy {
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 20px;
  line-height: 1;
}

.primary-nav a { transition: color 160ms ease; }
.primary-nav a:hover { color: var(--bronze); }

.theme-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  margin-left: auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.theme-toggle:hover,
.theme-toggle:focus-visible { border-color: var(--ink); outline: none; }

.language-switch {
  margin-left: 0;
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
}

.language-button {
  min-width: 38px;
  height: 32px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.language-button.is-active { background: var(--ink); color: var(--surface); }

.hero { margin: 38px auto 64px; width: min(100%, 975px); }

.hero-feature {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #4c5056;
}

.hero-feature img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #4c5056;
  cursor: grab;
  touch-action: pan-y;
}

.hero-track {
  display: flex;
  width: 100%;
  transform: translateX(-100%);
  transition: transform 760ms cubic-bezier(.2, .72, .18, 1);
  will-change: transform;
}

.hero-slide { flex: 0 0 100%; display: block; }
.hero-slide img { display: block; width: 100%; height: auto; }

.hero-carousel.is-dragging { cursor: grabbing; }
.hero-carousel.is-dragging .hero-track { user-select: none; }

.hero-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 58px;
  place-items: center;
  padding: 0;
  color: rgba(255, 255, 255, .96);
  font: 400 38px/1 Arial, sans-serif;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .88);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(.94);
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

.hero-carousel-control:hover { color: #fff; background: transparent; }
.hero-carousel-control:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.hero-carousel-control-prev { left: 18px; }
.hero-carousel-control-next { right: 18px; }

.hero-carousel:hover .hero-carousel-control,
.hero-carousel:focus-within .hero-carousel-control,
.hero-carousel.is-dragging .hero-carousel-control {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.collection-section, .chapters-section { margin: 0 0 88px; }

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0 0 28px;
}

.section-heading h1, .section-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
}

.section-heading span { color: var(--muted); font-size: 18px; }

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 24px 16px;
  align-items: start;
}

.object-tile,
.object-tile-wrapper {
  display: block;
  width: 100%;
  margin: 0;
}

.object-tile-wrapper {
  position: relative;
}

.object-tile-wrapper .object-tile {
  margin: 0;
}

.object-tile img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
  transition: transform 180ms ease, filter 180ms ease;
}

.object-tile:hover img:not(.inline-glyph), .object-tile-wrapper:hover .object-tile img:not(.inline-glyph), .chapter-link:hover img { filter: brightness(.94); transform: translateY(-2px); }

.tile-share-action {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .96);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .92)) drop-shadow(0 0 1px rgba(0, 0, 0, .64));
  transition: opacity 160ms ease, transform 160ms ease, color 160ms ease;
}

.tile-share-action svg { width: 17px; height: 17px; }

.object-tile-wrapper:hover .tile-share-action,
.object-tile-wrapper:focus-within .tile-share-action,
.tile-share-action:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tile-share-action:hover,
.tile-share-action:focus-visible {
  color: #fff;
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (hover: none) {
  .tile-share-action {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.object-tile span {
  display: block;
  margin-top: 9px;
  color: var(--tile-copy);
  font-size: 14px;
  line-height: 1.35;
}

.localized-title .title-zh, .localized-title .title-en { display: none; }
html[data-language="zh"] .localized-title .title-zh { display: inline; }
html[data-language="en"] .localized-title .title-en { display: inline; }

.object-tile .inline-glyph {
  display: inline-block;
  width: auto;
  height: 1.2em;
  margin: -.12em .04em -.22em;
  vertical-align: baseline;
  border-radius: 0;
}

.chapter-grid {
  width: min(100%, 940px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.chapter-grid-single {
  max-width: 450px;
  grid-template-columns: minmax(0, 1fr);
}

.chapter-link { display: block; }
.chapter-link img { display: block; width: 100%; height: auto; border-radius: 8px; transition: transform 180ms ease, filter 180ms ease; }
.chapter-label { display: block; margin-top: 14px; color: var(--chapter-copy); font-size: 17px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a:hover { color: var(--bronze); }

.share-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 26px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(20, 28, 33, .16);
  font-size: 14px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.share-toast.visible { opacity: 1; transform: translate(-50%, 0); }

.content-page {
  width: min(100%, 1080px);
  margin: 54px auto 92px;
}

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--bronze);
  font-size: 15px;
}

.back-link:hover { text-decoration: underline; }

.page-article {
  max-width: 900px;
  margin: 0 auto;
}

.page-title {
  margin: 0 0 32px;
  font-size: 45px;
  font-weight: 600;
  line-height: 1.08;
}

.academic-page {
  max-width: 1000px;
}

.academic-intro {
  display: grid;
  grid-template-columns: minmax(106px, 0.18fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: 18px 0 clamp(34px, 5vw, 54px);
  border-bottom: 1px solid var(--line);
}

.academic-mark-wrap {
  display: flex;
  justify-content: center;
}

.academic-mark {
  display: block;
  width: min(100%, 142px);
  height: auto;
}

html[data-theme="dark"] .academic-mark {
  filter: invert(1);
}

.academic-title {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif TC", "Songti TC", "STSong", "SimSun", Georgia, serif;
  font-size: clamp(30px, 4.1vw, 54px);
  font-weight: 600;
  line-height: 1.16;
}

.academic-lead {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.academic-resource-list {
  display: grid;
  margin-top: 4px;
}

.academic-resource {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 18px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease, padding-left 160ms ease;
}

.academic-resource:hover,
.academic-resource:focus-visible {
  padding-left: 8px;
  color: var(--bronze);
  outline: none;
}

.academic-resource-copy {
  display: grid;
  gap: 5px;
}

.academic-resource-copy strong {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.38;
}

.academic-resource-copy small,
.academic-resource-url {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.academic-resource-url {
  white-space: nowrap;
}

.academic-external {
  justify-self: end;
  font-size: 24px;
  line-height: 1;
}

.page-prose {
  color: var(--prose-copy);
  font-size: 18px;
  line-height: 1.82;
}

.page-prose p { margin: 0 0 22px; }

.about-prose { max-width: 850px; }

.contact-block {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.contact-block h2 {
  margin: 0 0 11px;
  font-size: 22px;
  font-weight: 600;
}

.contact-block p, .contact-block a {
  display: block;
  margin: 0;
  color: var(--soft-copy);
  font-size: 16px;
  line-height: 1.65;
}

.contact-block a:hover { color: var(--bronze); }

.source-quote {
  margin: 0 0 34px;
  padding: 0 0 0 22px;
  border-left: 2px solid var(--bronze);
  color: var(--soft-copy);
  font-size: 18px;
  line-height: 1.75;
}

.info-symbol {
  width: min(150px, 38%);
  margin: 48px auto;
  text-align: center;
}

.info-symbol img { display: block; width: 100%; height: auto; }

.manifesto {
  margin: 42px 0;
  padding: 27px 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--manifesto-copy);
  font-size: 18px;
  line-height: 1.72;
  white-space: pre-line;
}

.reference-gallery {
  columns: 3 210px;
  column-gap: 18px;
  margin-top: 52px;
}

.reference-figure {
  display: inline-block;
  width: 100%;
  margin: 0 0 24px;
  break-inside: avoid;
}

.reference-figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
.reference-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }

@media (max-width: 760px) {
  .site-shell { width: min(100% - 32px, 1420px); }
  .site-header { min-height: 92px; gap: 16px; }
  .brand img { width: 46px; height: 50px; }
  .brand-copy { display: none; }
  .primary-nav { gap: 10px; font-size: 15px; }
  .primary-nav span { display: none; }
  .theme-toggle { margin-left: auto; }
  .language-switch { margin-left: 0; }
  .language-button { min-width: 33px; height: 29px; }
  .hero { width: 100%; margin: 24px 0 48px; }
  .collection-section, .chapters-section { margin-bottom: 56px; }
  .masonry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .object-tile, .object-tile-wrapper { margin-bottom: 0; }
  .object-tile-wrapper .object-tile { margin-bottom: 0; }
  .object-tile span { font-size: 12px; }
  .tile-share-action { opacity: 1; pointer-events: auto; transform: none; }
  .chapter-grid { grid-template-columns: 1fr; gap: 34px; }
  .site-footer { flex-direction: column; gap: 7px; }
  .content-page { margin: 34px auto 62px; }
  .back-link { margin-bottom: 28px; }
  .page-title { margin-bottom: 24px; font-size: 34px; }
  .academic-intro { grid-template-columns: 78px minmax(0, 1fr); gap: 20px; padding-top: 0; }
  .academic-mark { width: 70px; }
  .academic-title { font-size: 31px; }
  .academic-lead { margin-top: 12px; font-size: 15px; }
  .academic-resource { grid-template-columns: minmax(0, 1fr) 22px; gap: 12px; padding: 20px 0; }
  .academic-resource-url { grid-column: 1; grid-row: 2; }
  .academic-external { grid-column: 2; grid-row: 1 / span 2; }
  .academic-resource-copy strong { font-size: 16px; }
  .page-prose { font-size: 16px; line-height: 1.78; }
  .contact-block { grid-template-columns: 1fr; gap: 24px; margin-top: 36px; }
  .source-quote { padding-left: 16px; font-size: 16px; }
  .manifesto { margin: 32px 0; padding: 20px 0; font-size: 16px; }
  .reference-gallery { columns: 2 132px; column-gap: 12px; margin-top: 36px; }
  .reference-figure { margin-bottom: 17px; }
}
