﻿@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@500;700;900&display=swap");

@font-face {
  font-family: "Yenz Noto Sans TC";
  src: url("assets/fonts/NotoSansTC-VF.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f5ef;
  --paper-2: #ebe7dd;
  --ink: #111315;
  --muted: #5d646a;
  --line: rgba(20, 38, 56, 0.17);
  --blue: #1f63aa;
  --blue-soft: rgba(31, 99, 170, 0.13);
  --blue-pale: #d7e8f5;
  --charcoal: #222629;
  --white: #fffefa;
  --shadow: 0 26px 70px rgba(20, 28, 34, 0.16);
  --serif: "Noto Serif TC", "Yenz Noto Sans TC", var(--sans);
  --sans: "Yenz Noto Sans TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.9;
  letter-spacing: 0;
}

h1,
h2,
h3,
.hero-title,
.opening-copy,
.opening-mark,
.detail-hero-copy {
  font-family: var(--serif);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(31, 99, 170, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(31, 99, 170, 0.05) 1px, transparent 1px);
  background-size: 112px 112px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.32;
  z-index: -2;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.42;
  background-image:
    radial-gradient(rgba(17, 19, 21, 0.1) 0.7px, transparent 0.7px),
    radial-gradient(rgba(31, 99, 170, 0.1) 0.6px, transparent 0.6px);
  background-position: 0 0, 14px 18px;
  background-size: 28px 28px;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(22px, 4vw, 64px);
  color: var(--ink);
  background: linear-gradient(rgba(247, 245, 239, 0.92), rgba(247, 245, 239, 0.62), transparent);
  backdrop-filter: blur(12px);
  font-family: var(--sans);
}

.nav-title {
  display: grid;
  gap: 1px;
  font-weight: 700;
}

.nav-title span {
  font-size: 15px;
}

.nav-title small {
  color: var(--blue);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav nav {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
  font-size: 14px;
}

.nav nav a {
  position: relative;
}

.nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(96px, 14vh, 150px) clamp(22px, 7vw, 110px) 72px;
  display: grid;
  grid-template-columns: minmax(360px, 0.96fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(24px, 5vw, 76px);
}

.hero-map {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-map::before {
  content: "";
  position: absolute;
  right: 12%;
  top: 0;
  width: 34vw;
  height: 100%;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.58) 18% 38%, transparent 38%),
    url("assets/map-1953.jpg") center / cover;
  opacity: 0.33;
  filter: grayscale(1) contrast(1.08);
}

.river {
  position: absolute;
  display: block;
  background: var(--blue);
  opacity: 0.22;
  filter: blur(0.2px);
}

.river-a {
  right: 22%;
  top: -10%;
  width: 140px;
  height: 120vh;
  border-radius: 48% 52% 42% 58%;
  transform: rotate(23deg);
  animation: drift 16s ease-in-out infinite alternate;
}

.river-b {
  left: 13%;
  bottom: 12%;
  width: 31vw;
  height: 84px;
  clip-path: polygon(0 70%, 22% 44%, 44% 58%, 63% 32%, 100% 48%, 100% 100%, 0 100%);
  opacity: 0.13;
  animation: floatLine 12s ease-in-out infinite alternate;
}

.grid-line {
  position: absolute;
  display: block;
  background: var(--blue);
  opacity: 0.48;
}

.line-a {
  left: 0;
  bottom: 21%;
  width: 62%;
  height: 1px;
}

.line-b {
  left: 35%;
  top: 16%;
  width: 1px;
  height: 68%;
}

.line-c {
  right: 4%;
  top: 5%;
  width: 1px;
  height: 88%;
}

.blue-block {
  position: absolute;
  width: 30px;
  height: 30px;
  background: var(--blue);
}

.block-a {
  left: 4%;
  top: 35%;
}

.block-b {
  right: 18%;
  bottom: 12%;
}

.hero-title {
  position: relative;
  z-index: 2;
}

.hero-title p,
.chapter-kicker,
.split-heading p,
.closing-inner p {
  margin: 0 0 20px;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-title h1 {
  margin: 0;
  font-size: clamp(58px, 6.4vw, 108px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: 0;
}

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

.hero-title h1 span:first-child::first-letter,
.hero-title h1 span:last-child :first-letter {
  color: var(--blue);
}

.hero-title strong {
  display: inline-block;
  margin-top: 32px;
  padding-left: 42px;
  color: #2d3338;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: 0.08em;
  border-left: 18px solid var(--blue);
}

.hero-collage {
  position: relative;
  z-index: 2;
  min-height: 72vh;
}

.photo {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.photo img {
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.62) contrast(1.08);
  transition: transform 1.2s ease, filter 0.8s ease;
}

.photo:hover img {
  transform: scale(1.045);
  filter: grayscale(0.15) contrast(1.04);
}

.photo-1 {
  right: 18%;
  top: 5%;
  width: 58%;
  height: 28%;
}

.photo-2 {
  right: 0;
  top: 32%;
  width: 46%;
  height: 24%;
}

.photo-3 {
  left: 0;
  bottom: 15%;
  width: 52%;
  height: 25%;
}

.photo-4 {
  right: 10%;
  bottom: 0;
  width: 42%;
  height: 28%;
}

.section {
  padding: clamp(72px, 10vw, 136px) clamp(22px, 7vw, 110px);
}

.opening {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: clamp(24px, 7vw, 96px);
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.55);
}

.opening-mark {
  color: var(--blue);
  writing-mode: vertical-rl;
  font-size: clamp(34px, 5vw, 74px);
  font-weight: 900;
  line-height: 1;
}

.opening-copy p {
  max-width: 860px;
  margin: 0;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.75;
}

.curatorial-section {
  background:
    linear-gradient(90deg, rgba(31, 99, 170, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(31, 99, 170, 0.05) 1px, transparent 1px),
    #fffefa;
  background-size: 96px 96px;
  border-bottom: 1px solid var(--line);
}

.curatorial-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.52fr) minmax(420px, 1fr);
  gap: clamp(34px, 7vw, 108px);
  align-items: start;
}

.curatorial-heading {
  position: sticky;
  top: 120px;
}

.curatorial-heading p,
.team-heading p {
  margin: 0 0 14px;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.curatorial-heading h2,
.team-heading h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 76px);
  line-height: 1.16;
}

.teacher-copy {
  max-width: 900px;
}

.teacher-copy p {
  margin: 0;
  color: #2f363b;
  font-size: clamp(17px, 1.38vw, 21px);
  line-height: 2.05;
}

.teacher-copy p + p {
  margin-top: 20px;
}

.teacher-copy .lead {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.75;
}

.teacher-copy h3 {
  margin: clamp(44px, 6vw, 74px) 0 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(31, 99, 170, 0.26);
  color: var(--ink);
  font-size: clamp(30px, 3.6vw, 54px);
  line-height: 1.24;
}

.teacher-copy .closing-line {
  margin-top: 26px;
  padding-left: 24px;
  color: #203447;
  border-left: 7px solid var(--blue);
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.85;
}

.chapter {
  position: relative;
}

.chapter-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(360px, 1fr);
  gap: clamp(32px, 7vw, 92px);
  align-items: center;
}

.chapter-layout.reverse {
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.84fr);
}

.chapter-layout.reverse .chapter-text {
  order: 2;
}

.chapter-text h2,
.split-heading h2,
.strip-copy h2,
.closing-inner h2 {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 78px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
}

.chapter-text p {
  margin: 26px 0 0;
  color: #2d3338;
  font-size: clamp(17px, 1.5vw, 21px);
}

.feature-image {
  position: relative;
  margin: 0;
}

.feature-image::before {
  content: "";
  position: absolute;
  inset: 28px -24px -24px 24px;
  border: 1px solid var(--blue);
  opacity: 0.38;
}

.feature-image img {
  position: relative;
  height: clamp(380px, 56vw, 640px);
  object-fit: cover;
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
}

.water {
  position: relative;
  overflow: hidden;
  background: #f2f7fa;
}

.water-lines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 43%, rgba(31, 99, 170, 0.22) 43% 43.2%, transparent 43.2%),
    linear-gradient(18deg, transparent 0 54%, rgba(31, 99, 170, 0.3) 54% 54.2%, transparent 54.2%);
  pointer-events: none;
}

.split-heading {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin-bottom: 48px;
}

.water-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.text-panel,
.map-card,
.craft-card,
.family-gallery figure {
  margin: 0;
  background: rgba(255, 254, 250, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(20, 28, 34, 0.08);
}

.text-panel {
  padding: 30px;
}

.text-panel span {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 26px;
  font-weight: 900;
}

.text-panel p {
  margin: 0;
  color: #30373c;
}

.map-card {
  overflow: hidden;
}

.map-card img {
  height: 310px;
  object-fit: cover;
  filter: grayscale(0.84) contrast(1.08);
}

.map-card figcaption,
.craft-card figcaption,
.family-gallery figcaption {
  padding: 0 18px 18px;
}

.memory-strip {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  min-height: 640px;
  background: var(--charcoal);
  color: #fff;
}

.strip-image img {
  height: 100%;
  min-height: 640px;
  object-fit: cover;
  filter: grayscale(0.46);
}

.strip-copy {
  display: grid;
  align-content: center;
  padding: clamp(42px, 7vw, 92px);
}

.strip-copy p {
  margin: 0 0 16px;
  color: #9cc7e8;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.strip-copy span {
  display: block;
  max-width: 760px;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 1.7vw, 22px);
}

.temple {
  background: var(--paper);
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(54px, 8vw, 96px);
}

.craft-card {
  overflow: hidden;
}

.craft-card img {
  height: 330px;
  object-fit: cover;
}

.craft-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 18px;
}

.family {
  background: #f8f1e5;
}

.family-gallery {
  display: grid;
  grid-template-columns: 1.25fr 0.76fr 1fr;
  gap: 18px;
  align-items: end;
  margin-top: clamp(54px, 8vw, 96px);
}

.family-gallery img {
  height: 360px;
  object-fit: cover;
}

.family-gallery figure:nth-child(2) img {
  height: 460px;
}

.closing {
  display: grid;
  min-height: 84vh;
  gap: clamp(56px, 8vw, 100px);
  align-items: center;
  padding: clamp(56px, 9vw, 120px);
  background:
    linear-gradient(rgba(247, 245, 239, 0.82), rgba(247, 245, 239, 0.92)),
    url("assets/lease-showa.jpg") center / cover;
}

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

.team-heading {
  display: grid;
  grid-template-columns: minmax(200px, 0.4fr) minmax(360px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: 36px;
}

.team-heading p {
  margin-bottom: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 32px;
}

.team-grid dl {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(31, 99, 170, 0.28);
}

.team-grid dt {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.team-grid dd {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.55;
}

.organizers {
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 38, 56, 0.14);
  color: #2f363b;
  font-family: var(--sans);
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.closing-inner {
  width: min(960px, 100%);
  margin: 0 auto;
  max-width: 960px;
  text-align: center;
}

.closing-inner h2 {
  font-size: clamp(38px, 6vw, 84px);
}

.portal-section {
  background: #fffefa;
  border-bottom: 1px solid var(--line);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.portal-card {
  display: grid;
  min-height: 560px;
  align-content: end;
  position: relative;
  overflow: hidden;
  padding: 28px;
  color: #fff;
  box-shadow: var(--shadow);
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 17, 26, 0.08), rgba(9, 17, 26, 0.78));
}

.portal-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease, filter 0.8s ease;
}

.portal-card:hover img {
  transform: scale(1.05);
  filter: grayscale(0.22);
}

.portal-card span,
.portal-card h3,
.portal-card p {
  position: relative;
  z-index: 2;
}

.portal-card span {
  color: #cfe6f8;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.portal-card h3 {
  margin: 12px 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
}

.portal-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--sans);
}

.detail-page {
  padding-top: 0;
}

.detail-hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: center;
  padding: clamp(130px, 14vh, 170px) clamp(22px, 7vw, 110px) clamp(58px, 8vw, 110px);
  position: relative;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 58%, rgba(31, 99, 170, 0.08) 58% 58.15%, transparent 58.15%),
    linear-gradient(rgba(31, 99, 170, 0.08) 1px, transparent 1px);
  background-size: auto, 100% 120px;
  pointer-events: none;
}

.detail-hero-copy,
.detail-hero-image {
  position: relative;
  z-index: 1;
}

.detail-hero-copy p,
.section-num,
.gallery-heading p {
  margin: 0 0 18px;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.detail-hero-copy h1 {
  margin: 0;
  font-size: clamp(54px, 7vw, 118px);
  line-height: 1.12;
  font-weight: 900;
}

.detail-hero-copy > span {
  display: block;
  max-width: 620px;
  margin-top: 30px;
  color: #2d3338;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.detail-hero-copy h1 span {
  display: block;
  margin: 0;
  color: inherit;
  font: inherit;
}

.detail-hero-image {
  margin: 0;
}

.detail-hero-image img {
  height: clamp(420px, 58vw, 700px);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.street-hero {
  background: #f3f7f8;
}

.temple-hero {
  background: #f8f1e5;
}

.family-hero {
  background: #f4f0e7;
}

.detail-intro,
.detail-grid-section,
.wide-story,
.list-section,
.timeline-section,
.festival-section,
.deity-section,
.document-section,
.family-clans,
.source-section,
.story-section,
.evidence-section,
.gallery-section {
  padding: clamp(62px, 9vw, 128px) clamp(22px, 7vw, 110px);
}

.detail-intro {
  background: var(--charcoal);
  color: #fff;
}

.detail-intro p {
  max-width: 1080px;
  margin: 0 auto;
  font-size: clamp(24px, 3.2vw, 44px);
  line-height: 1.75;
}

.detail-grid-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(360px, 1fr);
  gap: clamp(32px, 7vw, 92px);
  align-items: center;
  background: rgba(255, 254, 250, 0.58);
}

.detail-grid-section.alt {
  background: var(--paper-2);
}

.detail-text h2,
.wide-story h2,
.story-section h2,
.evidence-section h2,
.source-section h2,
.timeline-section h2,
.festival-section h2,
.deity-section h2,
.document-section h2,
.family-clans h2,
.gallery-heading h2,
.list-section h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.18;
  font-weight: 900;
}

.detail-text p:not(.section-num),
.document-section p,
.family-clans p,
.story-section p,
.source-section p,
.evidence-section p,
.wide-story-body p,
.place-list p {
  color: #30373c;
  font-size: clamp(17px, 1.55vw, 21px);
}

.detail-text p:not(.section-num) {
  margin: 24px 0 0;
}

.detail-photo {
  margin: 0;
}

.detail-photo img {
  height: clamp(360px, 54vw, 620px);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.wide-story {
  background: var(--charcoal);
  color: #fff;
}

.wide-story p,
.wide-story h2 {
  max-width: 1100px;
}

.wide-lead {
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.8;
}

.wide-story-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  margin-top: 34px;
}

.wide-story-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.list-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.45fr) 1fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
  background: #fffefa;
  border-top: 1px solid var(--line);
}

.section-brief {
  margin: 22px 0 0;
  color: #30373c;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.85;
}

.detail-quote {
  margin: 22px 0 0;
  padding: 20px 22px;
  border-left: 3px solid var(--blue);
  color: #1f3547;
  background: rgba(31, 99, 170, 0.08);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.8;
}

.detail-quote cite {
  display: block;
  margin-top: 10px;
  color: #5f6f7a;
  font-size: 0.82em;
  font-style: normal;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 8px 13px;
  color: #1d4268;
  background: rgba(31, 99, 170, 0.1);
  border: 1px solid rgba(31, 99, 170, 0.18);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
}

.place-list {
  display: grid;
  gap: 16px;
}

.place-list p {
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.timeline-section,
.festival-section,
.deity-section,
.story-section,
.source-section,
.evidence-section,
.family-clans,
.document-section {
  background: #fffefa;
}

.story-section {
  border-top: 1px solid var(--line);
}

.story-grid,
.evidence-grid,
.source-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) 1fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
}

.story-body {
  display: grid;
  gap: 26px;
}

.story-body article {
  padding-top: 24px;
  border-top: 1px solid rgba(31, 99, 170, 0.22);
}

.story-body h3,
.evidence-card h3,
.source-card h3 {
  margin: 0 0 12px;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.25;
}

.story-body p,
.evidence-card p,
.source-card p {
  margin: 0;
}

.story-body p + p,
.evidence-card p + p,
.source-card p + p {
  margin-top: 14px;
}

.evidence-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.evidence-card,
.source-card {
  background: rgba(247, 245, 239, 0.88);
  border: 1px solid var(--line);
}

.evidence-card {
  display: grid;
}

.evidence-card img {
  height: 260px;
  object-fit: cover;
}

.evidence-card div,
.source-card {
  padding: 22px;
}

.source-section {
  background: #eaf1f5;
  border-top: 1px solid rgba(31, 99, 170, 0.18);
}

.source-grid {
  grid-template-columns: minmax(260px, 0.42fr) repeat(3, minmax(0, 1fr));
}

.source-card strong {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.source-warning {
  padding: 22px;
  color: #24435f;
  background: rgba(31, 99, 170, 0.1);
  border-left: 7px solid var(--blue);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.timeline article,
.festival-grid article,
.deity-list article,
.clan-grid article {
  padding: 24px;
  background: rgba(247, 245, 239, 0.88);
  border: 1px solid var(--line);
}

.timeline span {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.timeline p,
.festival-grid p,
.deity-list span,
.clan-grid p {
  margin: 0;
  color: #41484e;
  font-family: var(--sans);
}

.festival-grid,
.clan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

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

.festival-grid h3,
.clan-grid h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.3;
}

.deity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.deity-list article {
  display: grid;
  gap: 8px;
}

.deity-list strong {
  font-size: 21px;
}

.document-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.5fr) 1fr;
  gap: clamp(28px, 6vw, 76px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.document-section p {
  margin: 0;
}

.gallery-section {
  background: #edf3f6;
}

.gallery-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.45fr) 1fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: end;
  margin-bottom: 36px;
}

.gallery {
  columns: 4 230px;
  column-gap: 18px;
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  background: #fffefa;
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(20, 28, 34, 0.08);
}

.gallery-item img {
  min-height: 170px;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 0 14px 14px;
  word-break: break-word;
}

.gallery-fallback {
  margin: 0;
  color: var(--muted);
}

.panel-link {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  margin-top: 28px;
  padding: 11px 20px;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 800;
}

.boards-page {
  background: #ece8dd;
}

.boards-hero {
  min-height: 74vh;
  display: grid;
  align-items: end;
  padding: clamp(130px, 14vh, 170px) clamp(22px, 7vw, 110px) clamp(64px, 9vw, 120px);
  background:
    linear-gradient(90deg, rgba(247, 245, 239, 0.96), rgba(247, 245, 239, 0.7)),
    url("assets/map-1953.jpg") center / cover;
}

.boards-hero-copy {
  max-width: 980px;
}

.boards-hero-copy p {
  margin: 0 0 18px;
  color: var(--blue);
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.boards-hero-copy h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 1.12;
}

.boards-hero-copy h1 span,
.board-content h3 span {
  display: block;
  margin: 0;
  color: inherit;
  font: inherit;
}

.boards-hero-copy > span {
  display: block;
  max-width: 820px;
  margin-top: 26px;
  color: #30373c;
  font-size: clamp(19px, 2.2vw, 30px);
  line-height: 1.6;
}

.board-group {
  padding: clamp(62px, 9vw, 124px) clamp(22px, 7vw, 110px);
}

.board-group + .board-group {
  border-top: 1px solid var(--line);
}

.board-group-title {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) 1fr;
  gap: clamp(20px, 5vw, 68px);
  align-items: end;
  margin-bottom: 38px;
}

.board-group-title p,
.board-meta,
.board-kicker {
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.board-group-title p {
  margin: 0 0 10px;
}

.board-group-title h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1.18;
}

.board-draft {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: clamp(18px, 4vw, 46px);
  align-items: start;
  margin-top: 36px;
}

.board-meta {
  position: sticky;
  top: 100px;
  writing-mode: vertical-rl;
  padding-top: 12px;
}

.board-sheet {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(300px, 0.78fr);
  gap: 30px;
  min-height: min(980px, 112vw);
  aspect-ratio: 4 / 9;
  max-width: 980px;
  padding: clamp(26px, 4vw, 52px);
  background:
    linear-gradient(90deg, rgba(31, 99, 170, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(31, 99, 170, 0.08) 1px, transparent 1px),
    #fffefa;
  background-size: 84px 84px;
  border: 1px solid rgba(20, 38, 56, 0.18);
  box-shadow: var(--shadow);
}

.board-content {
  display: grid;
  align-content: start;
}

.board-kicker {
  margin: 0 0 18px;
}

.board-content h3 {
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.15;
}

.board-content p {
  margin: 18px 0 0;
  color: #30373c;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.75;
}

.board-note {
  margin-top: 22px;
  padding: 16px;
  color: #24435f;
  background: rgba(31, 99, 170, 0.1);
  border-left: 6px solid var(--blue);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
}

.board-note strong {
  display: block;
  margin-bottom: 6px;
}

.board-points {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 14px;
}

.board-points li {
  padding: 8px 10px;
  background: rgba(31, 99, 170, 0.08);
  border: 1px solid rgba(31, 99, 170, 0.15);
}

.board-images {
  display: grid;
  gap: 14px;
  align-content: start;
}

.board-images img {
  height: 210px;
  object-fit: cover;
  filter: grayscale(0.18) contrast(1.04);
  border: 1px solid rgba(20, 38, 56, 0.14);
}

.board-images img:first-child {
  height: 320px;
}

.board-images img:nth-child(3) {
  height: 180px;
}

.board-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 99, 170, 0.2);
}

.board-photo-strip img,
.board-images .board-photo-strip img:first-child,
.board-images .board-photo-strip img:nth-child(3) {
  height: 92px;
  min-height: 0;
  object-fit: cover;
  filter: grayscale(0.22) contrast(1.04);
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  from {
    transform: rotate(23deg) translateY(-20px);
  }
  to {
    transform: rotate(19deg) translateY(26px);
  }
}

@keyframes floatLine {
  from {
    transform: translateX(-18px);
  }
  to {
    transform: translateX(24px);
  }
}

@media (max-width: 1100px) {
  .hero,
  .chapter-layout,
  .chapter-layout.reverse,
  .opening,
  .curatorial-grid,
  .memory-strip,
  .detail-hero,
  .detail-grid-section,
  .story-grid,
  .source-grid,
  .list-section,
  .document-section,
  .gallery-heading,
  .team-heading {
    grid-template-columns: 1fr;
  }

  .chapter-layout.reverse .chapter-text {
    order: 0;
  }

  .hero-collage {
    min-height: 560px;
  }

  .water-grid,
  .craft-grid,
  .evidence-grid,
  .family-gallery,
  .portal-grid,
  .timeline,
  .festival-grid,
  .clan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opening-mark {
    writing-mode: horizontal-tb;
  }

  .curatorial-heading {
    position: static;
  }

  .board-group-title,
  .board-draft,
  .board-sheet {
    grid-template-columns: 1fr;
  }

  .board-meta {
    position: static;
    writing-mode: horizontal-tb;
    padding-top: 0;
  }

  .board-sheet {
    aspect-ratio: auto;
    min-height: 0;
    max-width: none;
  }
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: hidden;
  }

  .nav {
    position: fixed;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px 12px;
    background: rgba(247, 245, 239, 0.96);
    box-shadow: 0 10px 28px rgba(20, 28, 34, 0.08);
  }

  .nav nav {
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    line-height: 1.35;
  }

  .nav-title span {
    font-size: 14px;
  }

  .nav-title small {
    font-size: 10px;
  }

  .hero {
    padding-top: 178px;
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: auto;
    padding-top: 178px;
    overflow: visible;
  }

  .detail-hero-copy,
  .detail-text,
  .document-section,
  .family-clans,
  .gallery-section {
    min-width: 0;
    max-width: 100%;
  }

  .detail-hero-copy h1 {
    font-size: clamp(38px, 12vw, 52px);
    line-height: 1.18;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .detail-hero-copy > span {
    max-width: 320px;
    font-size: clamp(17px, 4.8vw, 21px);
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .detail-hero-image img,
  .detail-photo img {
    height: auto;
    max-height: none;
  }

  .detail-intro,
  .detail-grid-section,
  .wide-story,
  .list-section,
  .story-section,
  .source-section,
  .evidence-section,
  .timeline-section,
  .festival-section,
  .deity-section,
  .document-section,
  .family-clans,
  .gallery-section {
    padding-inline: 18px;
  }

  .detail-intro p {
    font-size: clamp(20px, 5.4vw, 26px);
    line-height: 1.65;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .detail-text h2,
  .wide-story h2,
  .story-section h2,
  .evidence-section h2,
  .source-section h2,
  .timeline-section h2,
  .festival-section h2,
  .deity-section h2,
  .document-section h2,
  .family-clans h2,
  .gallery-heading h2,
  .list-section h2 {
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.25;
  }

  .story-body h3 {
    font-size: clamp(24px, 7.4vw, 32px);
  }

  .story-body h3,
  .story-body p,
  .evidence-card p,
  .source-card p,
  .place-list p {
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .hero-title h1 {
    font-size: clamp(44px, 14vw, 72px);
  }

  .hero-title {
    min-width: 0;
    max-width: 100%;
  }

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

  .hero-title strong {
    padding-left: 22px;
    border-left-width: 10px;
  }

  .hero-collage {
    min-height: 520px;
  }

  .photo-1 {
    left: 0;
    right: auto;
    width: 72%;
  }

  .photo-2 {
    width: 58%;
  }

  .photo-3 {
    width: 62%;
  }

  .photo-4 {
    width: 56%;
  }

  .water-grid,
  .craft-grid,
  .family-gallery,
  .portal-grid,
  .timeline,
  .festival-grid,
  .deity-list,
  .clan-grid,
  .wide-story-body,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .teacher-copy .lead {
    font-size: clamp(21px, 6.2vw, 30px);
  }

  .teacher-copy p {
    line-height: 1.9;
  }

  .feature-image img,
  .strip-image img,
  .family-gallery img,
  .family-gallery figure:nth-child(2) img {
    height: 320px;
    min-height: 0;
  }

  .memory-strip {
    min-height: 0;
  }

  .gallery {
    columns: 1;
  }

  .gallery-item {
    display: block;
    break-inside: avoid;
  }

  .boards-hero {
    min-height: 72vh;
    padding-top: 178px;
  }

  .boards-hero-copy,
  .board-group-title,
  .board-content,
  .board-images {
    min-width: 0;
    max-width: 100%;
  }

  .boards-hero-copy h1,
  .board-group-title h2,
  .board-content h3 {
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .boards-hero-copy h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .boards-hero-copy > span {
    font-size: clamp(17px, 5vw, 22px);
  }

  .board-group {
    padding-inline: 18px;
  }

  .board-sheet {
    padding: 22px;
    width: 100%;
    overflow: hidden;
  }

  .board-content h3 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .board-content p,
  .board-note,
  .board-points li {
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .board-images img,
  .board-images img:first-child,
  .board-images img:nth-child(3) {
    height: 220px;
  }

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

  .board-photo-strip img,
  .board-images .board-photo-strip img:first-child,
  .board-images .board-photo-strip img:nth-child(3) {
    height: 128px;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- inline photo strips for body sections ---------- */
.photo-strip {
  background: #fffefa;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.photo-strip-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) 1fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
}
.photo-strip-inner > div:first-child h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.25;
}
.photo-strip-inner > div:first-child p:not(.section-num) {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--sans);
}
.photo-strip-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.photo-strip-grid--two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.photo-strip-grid--four { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.photo-strip-grid figure {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.photo-strip-grid figure img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
.photo-strip-grid--two figure img { height: 320px; }
.photo-strip-grid--four figure img { height: 200px; }
.photo-strip-grid figcaption {
  padding: 12px 16px 16px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}
@media (max-width: 880px) {
  .photo-strip-inner { grid-template-columns: 1fr; }
  .photo-strip-grid figure img { height: 220px; }
}

/* 內文章節用的單張大圖（帶圖說） */
.inline-figure {
  margin: 24px 0 0;
  background: var(--white);
  border: 1px solid var(--line);
}
.inline-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}
.inline-figure figcaption {
  padding: 14px 22px 18px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}

/* 古文書卡：3 欄圖卡 */
.archive-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.archive-row figure {
  margin: 0;
  background: rgba(247, 245, 239, 0.88);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.archive-row figure img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.archive-row figcaption {
  padding: 14px 18px 18px;
  font-family: var(--sans);
}
.archive-row figcaption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.archive-row figcaption span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- curated image walls ---------- */
.photo-strip {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 254, 250, 0.94), rgba(244, 248, 250, 0.76)),
    #fffefa;
}

.photo-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 27%, rgba(31, 99, 170, 0.16) 27% calc(27% + 1px), transparent calc(27% + 1px)),
    linear-gradient(0deg, transparent 0 58%, rgba(31, 99, 170, 0.09) 58% calc(58% + 1px), transparent calc(58% + 1px));
  opacity: 0.72;
}

.photo-strip-inner {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(230px, 0.34fr) 1fr;
}

.photo-strip-inner > div:first-child {
  position: sticky;
  top: 118px;
}

.photo-strip-inner > div:first-child h2 {
  max-width: 11em;
}

.photo-strip-grid,
.photo-strip-grid--two,
.photo-strip-grid--four {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(58px, 6vw, 84px);
  grid-auto-flow: dense;
  gap: clamp(10px, 1.4vw, 18px);
}

.photo-strip-grid figure {
  position: relative;
  grid-column: span 4;
  grid-row: span 3;
  min-height: 0;
  border: 0;
  background: #17212a;
  box-shadow: 0 22px 48px rgba(41, 50, 58, 0.16);
  isolation: isolate;
}

.photo-strip-grid figure:nth-child(6n + 1) {
  grid-column: span 6;
  grid-row: span 5;
}

.photo-strip-grid figure:nth-child(6n + 2) {
  grid-column: span 6;
  grid-row: span 3;
}

.photo-strip-grid figure:nth-child(6n + 4),
.photo-strip-grid figure:nth-child(6n + 5) {
  grid-column: span 4;
  grid-row: span 3;
}

.photo-strip-grid--two figure {
  grid-column: span 6;
  grid-row: span 5;
}

.photo-strip-grid--four figure {
  grid-column: span 4;
  grid-row: span 3;
}

.photo-strip-grid--four figure:nth-child(8n + 1),
.photo-strip-grid--four figure:nth-child(8n + 6) {
  grid-column: span 6;
  grid-row: span 4;
}

.photo-strip-grid figure img,
.photo-strip-grid--two figure img,
.photo-strip-grid--four figure img {
  height: 100%;
  filter: saturate(0.92) contrast(1.04);
  transition: transform 0.7s ease, filter 0.7s ease;
}

.photo-strip-grid figure:hover img {
  transform: scale(1.035);
  filter: saturate(1.02) contrast(1.06);
}

.photo-strip-grid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 42px 16px 14px;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(0deg, rgba(7, 14, 20, 0.76), rgba(7, 14, 20, 0));
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.34);
}

.archive-row {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
}

.archive-row figure {
  grid-column: span 4;
  border: 0;
  box-shadow: 0 18px 42px rgba(41, 50, 58, 0.12);
}

.archive-row figure:nth-child(5n + 1),
.archive-row figure:nth-child(5n + 2) {
  grid-column: span 6;
}

@media (max-width: 880px) {
  .photo-strip::before {
    opacity: 0.42;
  }

  .photo-strip-inner > div:first-child {
    position: static;
  }

  .photo-strip-grid,
  .photo-strip-grid--two,
  .photo-strip-grid--four,
  .archive-row {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .photo-strip-grid figure,
  .photo-strip-grid figure:nth-child(n),
  .photo-strip-grid--two figure,
  .photo-strip-grid--four figure,
  .archive-row figure,
  .archive-row figure:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }

  .photo-strip-grid figure img,
  .photo-strip-grid--two figure img,
  .photo-strip-grid--four figure img {
    height: clamp(220px, 66vw, 340px);
  }

  .photo-strip-grid figcaption {
    position: static;
    padding: 12px 16px 16px;
    color: var(--muted);
    background: var(--white);
    text-shadow: none;
  }

  .archive-row figure img {
    height: clamp(240px, 72vw, 360px);
  }
}
