:root {
  --ink: #17333d;
  --muted: #62747a;
  --deep: #163f54;
  --teal: #2c7180;
  --leaf: #8ba95a;
  --mist: #edf3f0;
  --paper: #fffdf8;
  --line: #d9e2df;
  --shadow: 0 14px 36px rgba(21, 57, 66, .13);
  color-scheme: light;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f6f8f5; line-height: 1.65; }
a { color: inherit; }
button, input { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; background: white; padding: .7rem 1rem; }
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 20; min-height: 74px; padding: .75rem clamp(1rem, 4vw, 4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  color: white; background: rgba(22, 63, 84, .96); backdrop-filter: blur(12px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand-mark { overflow: hidden; width: 54px; height: 54px; flex: 0 0 54px; display: grid; place-items: center; padding: 5px; border-radius: 10px; background: white; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .08em; }
.brand small { margin-top: .05rem; color: #d8e5e2; font-size: .72rem; letter-spacing: .04em; }
.site-header nav { display: flex; gap: .25rem; }
.site-header nav a { padding: .55rem .8rem; border-radius: 999px; text-decoration: none; font-size: .92rem; }
.site-header nav a:hover, .site-header nav a:focus-visible { background: rgba(255,255,255,.14); }

main { min-height: 70vh; }
.wrap { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.hero {
  overflow: hidden; position: relative; min-height: 520px; padding: clamp(2rem, 6vw, 5rem) 0;
  color: white; background: linear-gradient(122deg, #123b50 0%, #216575 55%, #587b4d 100%);
}
.hero::after { content: ""; position: absolute; inset: 0; opacity: .22; background: radial-gradient(circle at 78% 18%, #fff 0 1px, transparent 2px), radial-gradient(circle at 74% 22%, #fff 0 1px, transparent 2px); background-size: 34px 34px, 46px 46px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr minmax(240px, 390px); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.eyebrow { margin: 0 0 .5rem; color: #dce8c4; font-size: .84rem; font-weight: 700; letter-spacing: .2em; }
.hero h1 { margin: 0; max-width: 700px; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: clamp(2.25rem, 6vw, 4.8rem); line-height: 1.12; letter-spacing: .08em; }
.hero-logo { width: 92px; height: 104px; margin-bottom: 1.1rem; padding: 7px; border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 10px 24px rgba(0,0,0,.18); object-fit: contain; }
.lead { max-width: 650px; margin: 1.2rem 0 1.8rem; color: #e4edef; font-size: clamp(1rem, 2vw, 1.22rem); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.15rem; border: 1px solid transparent; border-radius: 999px; color: white; background: var(--leaf); font-weight: 700; text-decoration: none; }
.button.secondary { border-color: rgba(255,255,255,.55); background: transparent; }
.cover { width: 100%; filter: drop-shadow(0 22px 22px rgba(0,0,0,.28)); transform: rotate(1.5deg); }

.section { padding: clamp(2.7rem, 6vw, 5rem) 0; }
.section.tint { background: var(--mist); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-heading h2, .page-heading h1 { margin: 0; font-family: "Noto Serif TC", "PMingLiU", serif; line-height: 1.25; letter-spacing: .06em; }
.section-heading a { color: var(--teal); font-weight: 700; text-decoration: none; }
.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature { padding: 1.4rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.78); }
.feature span { color: var(--leaf); font-size: 1.7rem; font-weight: 800; }
.feature h3 { margin: .35rem 0; }
.feature p { margin: 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.card { overflow: hidden; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(23,51,61,.07); text-decoration: none; transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-thumb { aspect-ratio: 16/10; overflow: hidden; background: #e8edeb; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transition: transform .25s; }
.card:hover img { transform: scale(1.025); }
.card-body { flex: 1; padding: 1.1rem 1.15rem 1.2rem; }
.tag { display: inline-block; margin-bottom: .4rem; color: var(--teal); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.card h3 { margin: 0; line-height: 1.4; }
.card p { margin: .45rem 0 0; color: var(--muted); font-size: .9rem; }

.page-hero { padding: clamp(2.2rem, 5vw, 4rem) 0 2rem; background: linear-gradient(180deg, #e8f0ed, #f6f8f5); }
.breadcrumbs { margin: 0 0 .7rem; color: var(--teal); font-size: .86rem; }
.breadcrumbs a { text-decoration: none; }
.page-heading p { margin: .7rem 0 0; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.search { flex: 1 1 270px; min-height: 46px; padding: .7rem 1rem; border: 1px solid #bfcfca; border-radius: 12px; background: white; color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter { padding: .55rem .8rem; border: 1px solid #bfcfca; border-radius: 999px; background: white; color: var(--ink); cursor: pointer; }
.filter.active { border-color: var(--teal); color: white; background: var(--teal); }
.result-count { margin: 0 0 1rem; color: var(--muted); }

.reader { padding: 2rem 0 4rem; }
.reader-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1.6rem; align-items: start; }
.page-stack { display: grid; gap: 1.5rem; }
.scan { margin: 0; }
.scan button { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; background: white; box-shadow: var(--shadow); cursor: zoom-in; }
.scan img { display: block; width: 100%; height: auto; border-radius: 12px; }
.scan figcaption { margin-top: .45rem; color: var(--muted); text-align: center; font-size: .82rem; }
.reader-aside { position: sticky; top: 94px; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: white; }
.reader-aside p { margin: 0 0 .8rem; color: var(--muted); font-size: .86rem; }
.reader-aside a { display: block; margin-top: .55rem; color: var(--teal); font-weight: 700; text-decoration: none; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 2rem; }
.pager a { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: white; text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager small { display: block; color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; }
.photo-tile { overflow: hidden; padding: 0; border: 0; border-radius: 12px; background: white; box-shadow: 0 6px 18px rgba(23,51,61,.1); cursor: zoom-in; }
.photo-tile img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.photo-tile span { display: block; padding: .55rem; color: var(--muted); font-size: .8rem; }

.image-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; color: white; background: rgba(7, 20, 25, .96); }
.image-dialog[open] { display: grid; grid-template-columns: 64px 1fr 64px; place-items: center; }
.image-dialog::backdrop { background: rgba(0,0,0,.7); }
.image-dialog figure { width: 100%; height: 100%; margin: 0; padding: 1.2rem 0; display: grid; grid-template-rows: 1fr auto; place-items: center; overflow: auto; }
.image-dialog img { max-width: 100%; max-height: calc(100vh - 70px); object-fit: contain; }
.image-dialog figcaption { padding-top: .5rem; color: #d5e0e2; }
.dialog-close { position: fixed; right: 1rem; top: .8rem; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; color: white; background: rgba(255,255,255,.14); font-size: 1.7rem; cursor: pointer; }
.dialog-arrow { width: 46px; height: 56px; border: 0; border-radius: 10px; color: white; background: rgba(255,255,255,.12); font-size: 2.4rem; cursor: pointer; }
.dialog-arrow:disabled { opacity: .25; }
.empty { grid-column: 1/-1; padding: 2rem; border-radius: 14px; color: var(--muted); background: white; text-align: center; }
.site-footer { padding: 2.2rem 1rem; color: #dce7e7; background: #102f3d; text-align: center; font-size: .85rem; }
.site-footer p { margin: .2rem; }

@media (max-width: 850px) {
  .hero-grid { grid-template-columns: 1fr minmax(190px, 32vw); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .reader-layout { grid-template-columns: 1fr; }
  .reader-aside { position: static; order: -1; }
}
@media (max-width: 620px) {
  .site-header { position: static; padding: .65rem .8rem; align-items: flex-start; flex-direction: column; gap: .45rem; }
  .brand-mark { width: 46px; height: 46px; flex-basis: 46px; padding: 4px; }
  .site-header nav { width: 100%; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.15); padding-top: .35rem; }
  .site-header nav a { padding: .35rem .55rem; }
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .cover { width: min(74%, 310px); margin: auto; }
  .intro-grid, .cards { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: start; flex-direction: column; }
  .page-hero { padding-top: 1.7rem; }
  .pager { grid-template-columns: 1fr; }
  .pager a:last-child { text-align: left; }
  .image-dialog[open] { grid-template-columns: 42px 1fr 42px; }
  .dialog-arrow { width: 38px; padding: 0; }
}

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