:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #22211f;
  --muted: #706b64;
  --line: #ddd6cb;
  --soft: #f1ece4;
  --accent: #6e4f3a;
  --accent-ink: #3d2b1f;
  --green: #4f6d5a;
  --blue: #405f7f;
  --shadow: 0 18px 45px rgba(47, 38, 28, 0.08);
  font-family: Roboto, "LXGW WenKai Screen", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --motion-fast: 140ms;
    --motion-medium: 190ms;
  }
}

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

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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 18%, rgba(79, 109, 90, 0.12), transparent 30%),
    radial-gradient(circle at 88% 34%, rgba(154, 123, 95, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(251, 250, 247, 0.9)),
    var(--paper);
  line-height: 1.8;
}

body.reader {
  font-family: Roboto, "Yozai", "LXGW WenKai Screen", sans-serif;
  --reading-progress: 0%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(249, 247, 242, 0.96)),
    #f9f7f2;
  color: #24211d;
}

body.reader::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: var(--reading-progress);
  height: 2px;
  background: linear-gradient(90deg, rgba(47, 113, 108, 0.55), rgba(110, 79, 58, 0.55));
  pointer-events: none;
}

body.catalog,
body.work,
body.about {
  font-family: Roboto, "LXGW WenKai Screen", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--motion-fast, 0.14s) var(--ease-out, ease);
}

a:hover {
  color: var(--accent);
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(220px, 420px) auto;
  align-items: center;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(221, 214, 203, 0.78);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(14px);
}

body.reader .site-header {
  position: static;
  grid-template-columns: auto 1fr;
  padding-block: 14px;
  border-bottom-color: rgba(221, 214, 203, 0.42);
  background: rgba(249, 247, 242, 0.72);
  backdrop-filter: none;
}

body.reader .site-nav {
  grid-column: 2;
}

body.reader .site-nav a {
  background: transparent;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color var(--motion-fast, 0.14s) var(--ease-out, ease), transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.brand:hover,
.brand:focus-visible {
  transform: translateY(-1px);
}

.top-search {
  position: relative;
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-search label {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.top-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.top-search input {
  width: 100%;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    background var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.top-search input:focus {
  outline: 2px solid rgba(110, 79, 58, 0.18);
  border-color: var(--accent);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 22px rgba(47, 38, 28, 0.08);
}

.top-search button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid rgba(47, 113, 108, 0.34);
  border-radius: 999px;
  background: #2f716c;
  color: #fff;
  cursor: pointer;
  font-family: Roboto, "LXGW WenKai Screen", sans-serif;
  line-height: 1.3;
  transition:
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.top-search button:hover,
.top-search button:focus-visible {
  background: #275f5b;
  outline: 2px solid rgba(47, 113, 108, 0.18);
  box-shadow: 0 10px 18px rgba(47, 113, 108, 0.16);
  transform: translateY(-1px);
}

.top-search button:active {
  transform: translateY(0);
  box-shadow: none;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  max-height: min(420px, calc(100vh - 110px));
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(221, 214, 203, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(47, 38, 28, 0.16);
  transform-origin: top center;
  animation: suggestion-pop var(--motion-medium, 0.19s) var(--ease-out, ease);
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--ink);
  line-height: 1.45;
  transition:
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.search-suggestion:hover,
.search-suggestion:focus-visible {
  background: var(--soft);
  color: var(--accent);
  outline: none;
  transform: translateX(2px);
}

.search-suggestion strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.45;
}

.search-suggestion span,
.search-suggestion-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.search-suggestion-empty {
  margin: 0;
  padding: 10px;
}

.site-nav {
  display: flex;
  grid-column: 3;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.site-nav a[aria-current="page"],
.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transform: translateY(-1px);
}

.page,
.reader-page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.portfolio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 376px);
  gap: clamp(34px, 8vw, 96px);
  align-items: center;
  min-height: min(690px, calc(100vh - 78px));
  padding: clamp(56px, 10vw, 118px) 0 clamp(48px, 8vw, 92px);
  border-bottom: 1px solid rgba(221, 214, 203, 0.72);
}

.hero-copy {
  max-width: 840px;
}

.hero-kicker {
  margin: 0 0 10px;
  color: #a55335;
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(64px, 8vw, 118px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0;
  color: #24221f;
  white-space: nowrap;
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
}

.hero-quote {
  margin: 28px 0 18px;
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.55;
  color: #252525;
}

.hero-description {
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
}

.hero-description p {
  margin: 0 0 6px;
}

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

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 26px;
  border-radius: 999px;
  background: #2f716c;
  color: #fff;
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
  font-size: 18px;
  box-shadow: 0 16px 34px rgba(47, 113, 108, 0.18);
  transition:
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.hero-cta:hover,
.hero-cta:focus-visible {
  color: #fff;
  background: #275f5b;
  outline: none;
  box-shadow: 0 18px 32px rgba(47, 113, 108, 0.22);
  transform: translateY(-1px);
}

.hero-cta:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(47, 113, 108, 0.14);
}

.hero-cta-secondary {
  border: 1px solid rgba(47, 113, 108, 0.34);
  background: rgba(255, 255, 255, 0.72);
  color: #2f716c;
  box-shadow: none;
}

.hero-cta-secondary:hover,
.hero-cta-secondary:focus-visible {
  color: #275f5b;
  background: rgba(255, 255, 255, 0.92);
}

.author-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 28px;
  min-height: 296px;
  padding: 34px 32px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 26px 80px rgba(63, 58, 49, 0.12);
}

.avatar {
  display: grid;
  place-items: center;
  width: 140px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(47, 113, 108, 0.12), transparent 45%),
    linear-gradient(180deg, #e8ece5, #ebe1d6);
  color: #31726d;
  font-size: 62px;
  font-weight: 400;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(180deg, #f4efe8, #e2d8cc);
}

.author-card p {
  margin: 0;
  color: #6c665e;
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
  font-size: 20px;
  line-height: 1.7;
  text-align: center;
}

.library-tools {
  margin: 28px 0 18px;
}

.featured-reads {
  margin: 34px 0 54px;
  padding: 34px 0 42px;
  border-bottom: 1px solid rgba(221, 214, 203, 0.72);
}

.featured-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 18px;
  text-align: center;
}

.featured-heading p {
  margin: 0;
  color: #a55335;
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.featured-heading h2 {
  margin: 0;
  color: var(--accent-ink);
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
  font-size: 30px;
  line-height: 1.35;
}

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

.featured-card {
  display: grid;
  align-content: space-between;
  gap: 22px;
  min-height: 270px;
  padding: 20px;
  border: 1px solid rgba(221, 214, 203, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 14px 30px rgba(47, 38, 28, 0.05);
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.featured-card:hover,
.featured-card:focus-within {
  border-color: rgba(47, 113, 108, 0.34);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 34px rgba(47, 38, 28, 0.08);
  transform: translateY(-2px);
}

.featured-card-copy,
.featured-card-meta {
  display: grid;
  gap: 10px;
}

.featured-badge {
  width: fit-content;
  padding: 3px 9px;
  border: 1px solid rgba(165, 83, 53, 0.28);
  border-radius: 999px;
  background: rgba(165, 83, 53, 0.08);
  color: #91462d;
  font-size: 13px;
  line-height: 1.45;
}

.featured-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
}

.featured-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.featured-card-meta span {
  color: var(--blue);
  font-size: 14px;
}

.featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.featured-tags small {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(79, 109, 90, 0.1);
  color: #4f6d5a;
}

.featured-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid rgba(47, 113, 108, 0.28);
  border-radius: 999px;
  color: #2f716c;
  font-weight: 700;
}

.featured-card-link:hover,
.featured-card-link:focus-visible {
  color: #fff;
  background: #2f716c;
  outline: none;
}

.library-title {
  margin: 0 0 22px;
  color: var(--accent-ink);
  font-family: Roboto, "975Maru SC", "LXGW WenKai Screen", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  align-items: center;
}

.tag-filter,
.inline-tag,
.reader-nav button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-family: Roboto, "LXGW WenKai Screen", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.tag-filter {
  min-height: 40px;
  padding: 7px 14px 8px;
}

.inline-tag {
  padding: 4px 10px 5px;
  font-size: 14px;
}

.tag-filter.is-active,
.tag-filter:hover,
.tag-filter:focus-visible,
.inline-tag:hover,
.inline-tag:focus-visible,
.reader-nav button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  transform: translateY(-1px);
}

.tag-filter:active,
.inline-tag:active {
  transform: translateY(0);
}

.tag-filter.is-active {
  box-shadow: inset 0 0 0 1px rgba(110, 79, 58, 0.18), 0 8px 18px rgba(47, 38, 28, 0.06);
}

.empty-note,
.result-note {
  margin: 0;
  color: var(--muted);
}

.category-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 40px;
}

.category-jump a {
  padding: 6px 12px;
  border-left: 3px solid var(--green);
  background: rgba(255, 255, 255, 0.62);
  transition:
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.category-jump a:hover,
.category-jump a:focus-visible {
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
  transform: translateX(2px);
}

.shelf-section,
.prose-block {
  margin-top: 44px;
}

.catalog-section {
  margin-top: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2,
.prose-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.section-heading span {
  color: var(--muted);
}

.work-grid {
  display: grid;
  position: relative;
  grid-template-columns: repeat(auto-fill, minmax(96px, 116px));
  grid-auto-rows: 260px;
  justify-content: start;
  align-items: end;
  gap: 44px 14px;
  min-height: 332px;
  padding: 24px 20px 44px;
  overflow: visible;
  border: 1px solid rgba(221, 214, 203, 0.42);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 280px,
      rgba(80, 55, 36, 0.18) 280px,
      rgba(80, 55, 36, 0.18) 284px,
      #a78360 284px,
      #a78360 300px,
      #75543b 300px,
      #75543b 304px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 240, 233, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 35px rgba(72, 54, 39, 0.08);
}

.work-card {
  position: relative;
  width: 100%;
  height: 232px;
  padding: 0;
  border: 1px solid rgba(78, 56, 39, 0.28);
  border-radius: 5px 5px 3px 3px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 18%, rgba(255, 255, 255, 0.34) 48%, rgba(0, 0, 0, 0.08)),
    linear-gradient(180deg, #f7f1e8, #cdbba4);
  box-shadow:
    inset 6px 0 8px rgba(255, 255, 255, 0.24),
    inset -7px 0 8px rgba(57, 37, 22, 0.16),
    6px 10px 20px rgba(64, 44, 27, 0.12);
  transform: translateY(0);
  transition:
    border-color var(--motion-medium, 0.19s) var(--ease-out, ease),
    box-shadow var(--motion-medium, 0.19s) var(--ease-out, ease),
    transform var(--motion-medium, 0.19s) var(--ease-out, ease);
}

.work-card:has(.work-card-link:hover),
.work-card:has(.work-card-link:focus-visible) {
  border-color: rgba(78, 56, 39, 0.42);
  box-shadow:
    inset 6px 0 8px rgba(255, 255, 255, 0.25),
    inset -7px 0 8px rgba(57, 37, 22, 0.18),
    8px 14px 24px rgba(64, 44, 27, 0.18);
  transform: translateY(-3px);
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 8px;
  width: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.work-card::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 18px;
  left: 10px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
}

.work-card:nth-child(3n + 1) {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent 19%, rgba(255, 255, 255, 0.28) 52%, rgba(0, 0, 0, 0.09)),
    linear-gradient(180deg, #d9e0d2, #80906e);
}

.work-card:nth-child(3n + 2) {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 20%, rgba(255, 255, 255, 0.26) 50%, rgba(0, 0, 0, 0.1)),
    linear-gradient(180deg, #e4d1c4, #9a684d);
}

.work-card:nth-child(4n) {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent 20%, rgba(255, 255, 255, 0.3) 52%, rgba(0, 0, 0, 0.1)),
    linear-gradient(180deg, #cfd8df, #667b8c);
}

.work-card:nth-child(5n) {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.15), transparent 18%, rgba(255, 255, 255, 0.28) 50%, rgba(0, 0, 0, 0.1)),
    linear-gradient(180deg, #e8dfc7, #a08b58);
}

.work-card[hidden],
.chapter-item[hidden],
.shelf-section[hidden] {
  display: none;
}

.work-card-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  padding: 14px 10px 48px;
  color: #241a13;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: color var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.work-card-link:focus-visible {
  color: #1d130d;
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: -5px;
}

.work-category,
.reader-title p,
.page-title p {
  color: var(--blue);
  font-size: 14px;
}

.work-card .work-category {
  max-height: 110px;
  overflow: hidden;
  white-space: nowrap;
}

.work-card h3 {
  margin: 0;
  max-height: 172px;
  font-size: 13px;
  line-height: 1.08;
  overflow: hidden;
  white-space: nowrap;
}

.work-card p {
  margin: 0;
  color: rgba(36, 26, 19, 0.68);
  font-size: 12px;
  white-space: nowrap;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.work-card .mini-tags {
  display: none;
}

.page-title {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title p,
.reader-title p {
  margin: 0 0 8px;
}

.page-title h1,
.reader-title h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.25;
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

body.reader .breadcrumb {
  justify-content: center;
  margin-bottom: 0;
  color: rgba(112, 107, 100, 0.72);
  font-size: 13px;
}

body.reader .breadcrumb a {
  transition: color var(--motion-fast, 0.14s) var(--ease-out, ease), opacity var(--motion-fast, 0.14s) var(--ease-out, ease);
}

body.reader .breadcrumb a:hover,
body.reader .breadcrumb a:focus-visible {
  color: #4f6d5a;
  outline: none;
}

.notice-box {
  margin: 28px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.notice-box p {
  margin: 6px 0 0;
}

.notice-box.muted {
  color: var(--muted);
}

.catalog-section summary,
.catalog-work summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  transition:
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.catalog-section summary::-webkit-details-marker,
.catalog-work summary::-webkit-details-marker {
  display: none;
}

.catalog-section > summary {
  min-height: 70px;
  padding: 14px 0;
  font-size: 25px;
  font-weight: 700;
}

.catalog-section > summary::before,
.catalog-work > summary::before {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1;
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.catalog-section[open] > summary::before,
.catalog-work[open] > summary::before {
  content: "-";
}

.catalog-section summary:hover,
.catalog-section summary:focus-visible,
.catalog-work summary:hover,
.catalog-work summary:focus-visible {
  color: var(--accent);
  outline: none;
  transform: translateX(2px);
}

.catalog-section summary:hover::before,
.catalog-section summary:focus-visible::before,
.catalog-work summary:hover::before,
.catalog-work summary:focus-visible::before {
  border-color: var(--accent);
  transform: rotate(90deg);
}

.catalog-section[open] > summary:hover::before,
.catalog-section[open] > summary:focus-visible::before,
.catalog-work[open] > summary:hover::before,
.catalog-work[open] > summary:focus-visible::before {
  transform: rotate(0deg) scale(1.04);
}

.catalog-section summary span,
.catalog-work summary span {
  flex: 1 1 auto;
}

.catalog-section summary small,
.catalog-work summary small {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.catalog-section-body {
  display: grid;
  gap: 10px;
  padding: 2px 0 24px 46px;
}

.catalog-work {
  border-left: 3px solid rgba(79, 109, 90, 0.28);
  background: rgba(255, 255, 255, 0.42);
}

.catalog-work > summary {
  min-height: 52px;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
}

.catalog-work > summary::before {
  width: 22px;
  font-size: 15px;
}

.catalog-work-body {
  padding: 0 14px 16px 50px;
}

.catalog-work-link {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--blue);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  transition:
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.catalog-work-link:hover,
.catalog-work-link:focus-visible {
  color: var(--accent);
  outline: none;
  transform: translateX(2px);
}

.catalog-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-chapters a {
  display: block;
  padding: 7px 0;
  border-bottom: 1px solid rgba(221, 214, 203, 0.62);
  color: #3a3630;
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    padding-left var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.catalog-chapters a:hover,
.catalog-chapters a:focus-visible {
  color: var(--accent);
  border-bottom-color: rgba(110, 79, 58, 0.34);
  outline: none;
  padding-left: 4px;
}

.work-chapters,
.chapter-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.work-chapters li,
.chapter-item {
  border-bottom: 1px solid var(--line);
}

.work-chapters a,
.chapter-item a {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  transition:
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    padding-left var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.work-chapters a:hover,
.work-chapters a:focus-visible,
.chapter-item a:hover,
.chapter-item a:focus-visible {
  color: var(--accent);
  outline: none;
  padding-left: 4px;
}

.work-start-reading {
  display: flex;
  justify-content: center;
  padding: 54px 0 22px;
}

.start-reading-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 48px;
  padding: 10px 28px;
  border: 1px solid rgba(47, 113, 108, 0.36);
  border-radius: 999px;
  background: #2f716c;
  color: #fff;
  font-family: Roboto, "LXGW WenKai Screen", sans-serif;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(47, 113, 108, 0.16);
  transition:
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.start-reading-button:hover,
.start-reading-button:focus-visible {
  color: #fff;
  background: #275f5b;
  outline: none;
  transform: translateY(-1px);
}

.start-reading-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(47, 113, 108, 0.12);
}

.chapter-item small {
  color: var(--muted);
}

.reader-page {
  width: min(760px, calc(100% - 42px));
  padding: 58px 0 170px;
}

.reader-article {
  padding-top: 0;
}

.reader-title {
  margin: 28px 0 54px;
  text-align: center;
}

.reader-title p {
  margin-bottom: 12px;
  color: rgba(64, 95, 127, 0.78);
  font-family: Roboto, "LXGW WenKai Screen", sans-serif;
}

.reader-title h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.32;
  color: #24211d;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.reader-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 22px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  align-items: center;
  width: max-content;
  max-width: min(420px, calc(100% - 48px));
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(221, 214, 203, 0.46);
  border-radius: 20px;
  background: rgba(251, 250, 247, 0.62);
  box-shadow: 0 10px 24px rgba(47, 38, 28, 0.05);
  backdrop-filter: blur(14px);
  opacity: 0.58;
  transform: translateX(-50%);
  transition:
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    opacity var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.reader-nav:hover,
.reader-nav:focus-within {
  background: rgba(251, 250, 247, 0.9);
  box-shadow: 0 12px 28px rgba(47, 38, 28, 0.1);
  opacity: 1;
}

.reader-nav-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgba(110, 79, 58, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  color: rgba(93, 70, 54, 0.86);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.reader-nav-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reader-nav-item:hover,
.reader-nav-item:focus-visible {
  color: #275f5b;
  border-color: rgba(47, 113, 108, 0.44);
  background: rgba(47, 113, 108, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.reader-nav-item.is-disabled {
  color: #b8afa4;
  border-color: rgba(221, 214, 203, 0.68);
  background: rgba(242, 238, 232, 0.42);
  box-shadow: none;
  cursor: default;
}

.reader-nav-item.is-disabled:hover {
  color: #b8afa4;
  border-color: rgba(221, 214, 203, 0.96);
  transform: none;
}

.reader-nav-item::after {
  content: attr(data-tip);
  position: absolute;
  right: 50%;
  top: auto;
  bottom: calc(100% + 8px);
  z-index: 1;
  padding: 5px 9px;
  border: 1px solid rgba(221, 214, 203, 0.8);
  border-radius: 999px;
  background: rgba(34, 33, 31, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.reader-nav-item:hover::after,
.reader-nav-item:focus-visible::after {
  opacity: 1;
  transform: translate(50%, 0);
}

.article-body {
  color: #25211d;
  font-size: 20px;
  line-height: 2.18;
  font-family: Roboto, "Yozai", "LXGW WenKai Screen", sans-serif;
  letter-spacing: 0;
}

.article-body p,
.prose-block p {
  margin: 0 0 1.42em;
  white-space: pre-wrap;
}

.article-body p:first-child {
  margin-top: 0;
}

.reader-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 86px;
  padding-top: 34px;
  border-top: 1px solid rgba(221, 214, 203, 0.52);
}

.reader-pager-link {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid rgba(221, 214, 203, 0.66);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  color: var(--ink);
  box-shadow: none;
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    box-shadow var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.reader-pager-link span {
  color: var(--muted);
  font-family: Roboto, "LXGW WenKai Screen", sans-serif;
  font-size: 14px;
}

.reader-pager-link strong {
  overflow-wrap: anywhere;
  font-size: 19px;
  line-height: 1.55;
}

.reader-pager-next {
  text-align: right;
}

.reader-pager-link:hover,
.reader-pager-link:focus-visible {
  border-color: rgba(47, 113, 108, 0.42);
  color: #275f5b;
  background: rgba(255, 255, 255, 0.74);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(47, 38, 28, 0.08);
}

.reader-pager-link.is-disabled {
  color: #b8afa4;
  background: rgba(242, 238, 232, 0.52);
  box-shadow: none;
}

.reader-pager-link.is-disabled strong,
.reader-pager-link.is-disabled span {
  color: inherit;
}

.article-interactions {
  display: grid;
  gap: 32px;
  margin-top: 56px;
  padding-top: 34px;
  border-top: 1px solid rgba(221, 214, 203, 0.52);
}

.like-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: center;
}

.like-button,
.comment-form button {
  border: 1px solid rgba(47, 113, 108, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #2f716c;
  cursor: pointer;
  transition:
    border-color var(--motion-fast, 0.14s) var(--ease-out, ease),
    background var(--motion-fast, 0.14s) var(--ease-out, ease),
    color var(--motion-fast, 0.14s) var(--ease-out, ease),
    transform var(--motion-fast, 0.14s) var(--ease-out, ease);
}

.like-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
}

.like-button span {
  font-size: 20px;
  line-height: 1;
}

.like-button:hover,
.like-button:focus-visible,
.like-button.is-liked,
.comment-form button:hover,
.comment-form button:focus-visible {
  border-color: rgba(47, 113, 108, 0.5);
  background: #2f716c;
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.like-button:disabled,
.comment-form button:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}

.like-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.comment-panel {
  display: grid;
  gap: 18px;
}

.comment-heading {
  display: grid;
  gap: 4px;
  text-align: center;
}

.comment-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
}

.comment-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.comment-form {
  display: grid;
  gap: 12px;
}

.comment-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid rgba(221, 214, 203, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.comment-form input {
  min-height: 42px;
  padding: 8px 12px;
}

.comment-form textarea {
  min-height: 124px;
  padding: 10px 12px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: rgba(47, 113, 108, 0.44);
  outline: 2px solid rgba(47, 113, 108, 0.12);
}

.comment-form button {
  justify-self: end;
  min-height: 42px;
  padding: 8px 18px;
}

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

.comment-empty,
.comment-item {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(221, 214, 203, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.comment-empty {
  color: var(--muted);
  text-align: center;
}

.comment-item header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.comment-item strong {
  color: #2f716c;
}

.comment-item time {
  color: var(--muted);
  font-size: 13px;
}

.comment-item p {
  margin: 0;
  white-space: pre-wrap;
}

.prose-block {
  max-width: 820px;
  font-size: 18px;
}

.contact-list {
  padding-left: 1.2em;
}

.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@keyframes suggestion-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 10px;
  }

  .site-nav {
    grid-column: auto;
    justify-content: flex-start;
  }

  body.reader .site-header {
    grid-template-columns: 1fr;
    padding-block: 12px;
  }

  body.reader .site-nav {
    grid-column: auto;
  }

  .top-search {
    grid-column: auto;
    width: 100%;
  }

  .portfolio-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 42px;
  }

  .author-card {
    order: 0;
    min-height: 246px;
    padding: 28px 24px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 13vw, 60px);
  }

  .hero-quote {
    font-size: 22px;
    margin-top: 20px;
  }

  .hero-description {
    font-size: 16px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    min-height: 0;
  }

  .article-body {
    font-size: 18px;
  }

  .catalog-section > summary {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-height: 0;
    padding: 16px 0;
    font-size: 22px;
  }

  .catalog-section summary small,
  .catalog-work summary small {
    width: 100%;
    padding-left: 34px;
  }

  .catalog-section-body {
    padding-left: 0;
  }

  .catalog-work > summary {
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .catalog-work-body {
    padding-left: 14px;
  }

  .catalog-chapters {
    grid-template-columns: 1fr;
  }

  .reader-page {
    width: min(100% - 32px, 720px);
    padding-top: 42px;
    padding-bottom: 156px;
  }

  .reader-title {
    margin: 22px 0 42px;
  }

  .reader-nav {
    bottom: 16px;
    width: max-content;
    max-width: calc(100% - 24px);
    gap: 9px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .reader-nav-item {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    font-size: 14px;
  }

  .reader-nav-icon {
    width: 19px;
    height: 19px;
  }

  .reader-pager {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 52px;
  }

  .reader-pager-link {
    min-height: 82px;
    padding: 16px;
  }

  .reader-pager-next {
    text-align: left;
  }

  .reader-pager-link strong {
    font-size: 18px;
  }

  .comment-form button {
    justify-self: stretch;
  }

  .work-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    grid-auto-rows: 232px;
    min-height: 268px;
    gap: 34px 10px;
    padding: 18px 12px 34px;
    background:
      repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 246px,
        rgba(80, 55, 36, 0.18) 246px,
        rgba(80, 55, 36, 0.18) 250px,
        #a78360 250px,
        #a78360 262px,
        #75543b 262px,
        #75543b 266px
      ),
      linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 240, 233, 0.7));
  }

  .work-card,
  .work-card:nth-child(3n + 1),
  .work-card:nth-child(3n + 2),
  .work-card:nth-child(4n),
  .work-card:nth-child(5n) {
    height: 202px;
  }

  .work-card h3 {
    max-height: 150px;
    font-size: 12px;
    line-height: 1.06;
  }

  .work-card-link {
    padding: 12px 8px 40px;
  }

  .work-category,
  .work-card p {
    font-size: 12px;
  }
}
