:root {
  --bg: #f7f8f5;
  --paper: #ffffff;
  --paper-soft: #eef3ef;
  --ink: #16211c;
  --muted: #617067;
  --line: #d7ded5;
  --accent: #2f665b;
  --accent-dark: #1f4b43;
  --accent-warm: #a35f34;
  --accent-blue: #455f8f;
  --shadow: 0 18px 45px rgba(26, 42, 34, 0.12);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  transform: translateY(-140%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  border-bottom: 1px solid rgba(215, 222, 213, 0.82);
  background: rgba(247, 248, 245, 0.92);
  padding: 14px clamp(18px, 4vw, 48px);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(47, 102, 91, 0.35);
  border-radius: 8px;
  background: var(--paper);
  color: var(--accent-dark);
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 1px;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 30px);
}

.main-nav a,
.header-cta,
.site-footer a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.main-nav a {
  color: var(--muted);
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.header-cta {
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 9px 14px;
  color: var(--accent-dark);
}

.header-cta:hover {
  background: var(--accent);
  color: #fff;
}

.hero {
  position: relative;
  min-height: min(640px, 68vh);
  overflow: hidden;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(247, 248, 245, 0.98) 0%, rgba(247, 248, 245, 0.9) 44%, rgba(247, 248, 245, 0.28) 100%),
    radial-gradient(circle at 72% 42%, rgba(47, 102, 91, 0.18), transparent 35%),
    var(--bg);
  padding: clamp(64px, 8vw, 76px) clamp(18px, 4vw, 48px) clamp(48px, 7vw, 58px);
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 88px;
  background: linear-gradient(180deg, rgba(247, 248, 245, 0), var(--bg));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  margin: 0 auto;
  margin-left: max(0px, calc((100vw - var(--max)) / 2));
}

.hero h1 {
  max-width: 11ch;
  margin: 0 0 22px;
  font-size: 5.8rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
}

.hero-lead {
  max-width: 590px;
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 1.58rem;
  font-weight: 800;
  line-height: 1.45;
}

.hero-copy {
  max-width: 590px;
  margin: 0;
  color: #35423b;
  font-size: 1.05rem;
}

.hero-actions,
.book-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.filter-button:hover {
  transform: translateY(-1px);
}

.button-primary,
.button-buy {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 102, 91, 0.24);
}

.button-primary:hover,
.button-buy:hover {
  background: var(--accent-dark);
}

.button-store {
  border-color: rgba(69, 95, 143, 0.38);
  background: var(--paper);
  color: var(--accent-blue);
}

.button-store:hover {
  border-color: var(--accent-blue);
  background: #eef2f8;
}

.button-quiet,
.button-secondary {
  border-color: rgba(47, 102, 91, 0.3);
  background: var(--paper);
  color: var(--accent-dark);
}

.button-secondary {
  background: var(--ink);
  color: #fff;
}

.button-secondary:hover {
  background: var(--accent-dark);
}

.hero-covers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-cover {
  position: absolute;
  width: clamp(160px, 20vw, 290px);
  aspect-ratio: 0.72;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 26px 62px rgba(21, 35, 29, 0.22);
}

.cover-one {
  right: clamp(34px, 10vw, 170px);
  top: clamp(92px, 12vw, 132px);
  transform: rotate(-4deg);
}

.cover-two {
  right: clamp(16px, 4vw, 86px);
  bottom: clamp(76px, 9vw, 132px);
  width: clamp(170px, 22vw, 310px);
  transform: rotate(5deg);
}

.cover-three {
  right: clamp(210px, 25vw, 430px);
  bottom: clamp(26px, 5vw, 72px);
  width: clamp(145px, 17vw, 245px);
  transform: rotate(-9deg);
}

.section {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 92px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2,
.reader-panel h2,
.purchase-copy h2,
.disclosure-section h2 {
  margin: 0 0 14px;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.12;
}

.section-heading p,
.reader-panel p,
.purchase-copy p,
.disclosure-section p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.author-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
  gap: clamp(22px, 5vw, 72px);
  align-items: start;
}

.author-copy {
  border-left: 4px solid var(--accent-warm);
  padding-left: 22px;
}

.author-copy p {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 650;
  line-height: 1.7;
}

.author-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-points li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 14px 16px;
  color: #314039;
  font-weight: 700;
}

.reader-section {
  padding-top: 16px;
}

.reader-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  border: 1px solid rgba(47, 102, 91, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eef3ef 100%);
  padding: clamp(24px, 5vw, 42px);
}

.books-section {
  padding-top: clamp(48px, 7vw, 76px);
}

.books-heading {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 8px 13px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.filter-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.book-grid {
  display: grid;
  gap: 22px;
}

.book-card {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 14px 34px rgba(26, 42, 34, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.book-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 102, 91, 0.38);
  box-shadow: var(--shadow);
}

.book-card[hidden] {
  display: none;
}

.book-media {
  display: grid;
  align-items: start;
}

.book-media img {
  width: 100%;
  aspect-ratio: 0.72;
  border: 1px solid rgba(22, 33, 28, 0.12);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(26, 42, 34, 0.14);
}

.book-content {
  display: grid;
  align-content: start;
  gap: 16px;
}

.book-type {
  width: fit-content;
  margin: 0;
  border-left: 3px solid var(--accent-blue);
  padding-left: 10px;
  color: var(--accent-blue);
  font-size: 0.9rem;
  font-weight: 900;
}

.book-content h3 {
  margin: 0;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
}

.book-content p {
  margin: 0;
  color: #3f4d45;
}

.book-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.book-meta div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.book-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.book-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.price-note,
.channel-pending {
  color: var(--muted);
  font-size: 0.92rem;
}

.fit-list {
  border-left: 4px solid rgba(163, 95, 52, 0.45);
  padding-left: 18px;
}

.fit-list h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.fit-list ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  color: #3f4d45;
}

.purchase-section {
  padding-top: 18px;
  padding-bottom: 18px;
}

.purchase-copy {
  max-width: 820px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.faq-section {
  padding-bottom: 48px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 0 18px;
}

summary {
  position: relative;
  min-height: 58px;
  cursor: pointer;
  padding: 17px 34px 17px 0;
  font-weight: 850;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 180ms ease;
}

details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

details p {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 14px 0 18px;
  color: var(--muted);
}

.disclosure-section {
  max-width: 860px;
  margin-bottom: 42px;
  border: 1px solid rgba(163, 95, 52, 0.28);
  border-radius: 8px;
  background: #fffaf6;
  padding: clamp(24px, 4vw, 36px);
}

.disclosure-section h2 {
  color: #6f3f24;
  font-size: 1.9rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 28px clamp(18px, 4vw, 48px);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid rgba(47, 102, 91, 0.38);
  outline-offset: 3px;
}

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

  .main-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 66px;
  }

  .hero-content {
    margin-left: 0;
  }

  .hero-covers {
    opacity: 0.3;
  }

  .cover-one {
    right: 26px;
    top: 92px;
  }

  .cover-two {
    right: -18px;
    bottom: 62px;
  }

  .cover-three {
    right: 190px;
    bottom: 28px;
  }

  .author-layout,
  .books-heading,
  .reader-panel {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    justify-content: flex-start;
  }

  .book-card {
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .site-header {
    gap: 12px;
    padding-inline: 14px;
  }

  .brand-text {
    font-size: 0.9rem;
  }

  .header-cta {
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(247, 248, 245, 0.95) 0%, rgba(247, 248, 245, 0.8) 70%, rgba(247, 248, 245, 0.98) 100%),
      var(--bg);
    padding-top: 54px;
    padding-bottom: 160px;
  }

  .hero h1 {
    font-size: 3.55rem;
    line-height: 0.98;
  }

  .hero-lead {
    font-size: 1.22rem;
  }

  .section-heading h2,
  .reader-panel h2,
  .purchase-copy h2,
  .disclosure-section h2 {
    font-size: 2rem;
  }

  .author-copy p {
    font-size: 1.08rem;
  }

  .book-content h3 {
    font-size: 1.8rem;
  }

  .hero-copy,
  .section-heading p,
  .reader-panel p,
  .purchase-copy p,
  .disclosure-section p {
    font-size: 1rem;
  }

  .hero-covers {
    opacity: 1;
  }

  .hero-cover {
    width: 116px;
  }

  .cover-one {
    right: 48%;
    top: auto;
    bottom: 32px;
  }

  .cover-two {
    right: 22px;
    bottom: 42px;
    width: 130px;
  }

  .cover-three {
    right: 35%;
    bottom: 16px;
    width: 104px;
  }

  .section {
    width: min(100% - 28px, var(--max));
  }

  .book-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .book-media {
    justify-items: center;
  }

  .book-media img {
    width: min(245px, 78vw);
  }

  .book-meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

  .button,
  .filter-button {
    width: 100%;
  }

  .book-actions,
  .hero-actions {
    align-items: stretch;
  }
}

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