@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #1B1A17;
  --copper: #C8A97E;
  --paper: #F2EDE4;
  --paper-deep: #E7DECE;
  --copper-soft: rgba(200, 169, 126, 0.55);
  --line: rgba(27, 26, 23, 0.16);
  --muted: rgba(27, 26, 23, 0.66);
  --shell: 1180px;
  --serif: 'EB Garamond', 'Crimson Text', Georgia, 'Songti SC', 'Noto Serif SC', serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 88% 4%, rgba(200, 169, 126, 0.22), transparent 46%),
    radial-gradient(circle at 4% 84%, rgba(27, 26, 23, 0.08), transparent 54%),
    repeating-linear-gradient(0deg, rgba(27, 26, 23, 0.035) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

a {
  color: #8A6F47;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

/* ---------- 页头 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(242, 237, 228, 0.95);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--copper-soft);
}

.imprint {
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-block;
  padding: 0.7rem 0.4rem 0.55rem;
  font-size: 17px;
  letter-spacing: 0.42em;
  color: var(--ink);
  text-decoration: none;
  text-indent: 0.42em;
}

.menu {
  padding: 0.3rem 0.9rem 0.55rem;
}

.menu-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.3rem 0.85rem;
  font-size: 16px;
  letter-spacing: 0.24em;
  border: 1px solid var(--copper-soft);
  border-radius: 4px;
  cursor: pointer;
}

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

.menu-summary::after {
  content: "＋";
  color: var(--copper);
  letter-spacing: 0;
}

.menu[open] > .menu-summary::after {
  content: "－";
}

.menu-list {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
}

.menu-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.15rem;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}

.menu-list a:hover {
  color: #8A6F47;
}

/* ---------- 主区 ---------- */

.spread {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 0;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.3rem;
  align-content: center;
  min-height: 100svh;
  padding: 1.6rem 1rem 5.6rem;
  overflow: clip;
  border-bottom: 1px solid var(--copper-soft);
  scroll-margin-top: 9rem;
}

.layer {
  position: absolute;
  inset: -12% -10%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.layer-far {
  background: radial-gradient(ellipse at 22% 12%, rgba(200, 169, 126, 0.62), rgba(200, 169, 126, 0) 62%);
}

.layer-mid {
  background-image: repeating-linear-gradient(90deg, rgba(27, 26, 23, 0.1) 0 1px, rgba(27, 26, 23, 0) 1px 52px);
  opacity: 0.5;
}

.layer-near {
  background: radial-gradient(ellipse at 80% 90%, rgba(27, 26, 23, 0.16), rgba(27, 26, 23, 0) 60%);
}

.hero-media,
.hero-type {
  position: relative;
  z-index: 2;
}

.hero-media {
  margin: 0;
  min-height: 34vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--copper-soft);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(158deg, var(--paper-deep), #DCD1BC);
}

.hero-media.is-empty::after {
  content: "";
  width: 62%;
  height: 62%;
  border: 1px solid var(--copper-soft);
  border-radius: 50%;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.16) contrast(1.03);
}

.hero-type {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.9rem;
  text-align: right;
}

.hero-type h1 {
  margin: 0;
  font-size: clamp(2rem, 7.4vw, 4rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.lead {
  margin: 0;
  max-width: 32ch;
  font-size: 1.02rem;
  color: var(--muted);
}

.cue {
  margin: 0.2rem 0 0;
}

.cue a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.2rem 0.1rem;
  font-size: 16px;
  letter-spacing: 0.34em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--copper);
}

.cue a::after {
  content: "↓";
  letter-spacing: 0;
  color: var(--copper);
}

.seal {
  position: absolute;
  right: 1rem;
  bottom: 1.2rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding: 0.4rem;
  border: 2px solid var(--copper);
  border-radius: 50%;
  font-size: 16px;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: #8A6F47;
  background: rgba(242, 237, 228, 0.6);
  transform: rotate(-8deg);
}

/* ---------- 正文章节 ---------- */

.story > article:not(.hero) {
  grid-column: 1;
  padding: 2.3rem 1rem;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 9rem;
}

.story h2 {
  margin: 0 0 0.65rem;
  padding-bottom: 0.5rem;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 600;
  line-height: 1.28;
  border-bottom: 1px solid var(--copper-soft);
}

.story h2 + p {
  margin-top: 0;
  color: var(--muted);
}

.story h3 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.35;
}

.story p {
  margin: 0 0 1rem;
  max-width: 66ch;
}

.story a {
  color: #8A6F47;
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-underline-offset: 3px;
}

.story ul,
.story ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
  max-width: 64ch;
}

.story li {
  margin: 0.35rem 0;
}

.story li::marker {
  color: var(--copper);
}

.story strong {
  font-weight: 700;
}

.story figure {
  margin: 1.5rem 0;
  padding: 0.5rem;
  border: 1px solid var(--copper-soft);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
}

.story figure img {
  border-radius: 2px;
}

.story figcaption {
  font-size: 16px;
  color: var(--muted);
  padding-top: 0.4rem;
}

.story blockquote {
  margin: 1.4rem 0;
  padding: 0.7rem 0 0.7rem 1.1rem;
  border-left: 3px solid var(--copper);
  color: var(--muted);
}

.story blockquote p:last-child {
  margin-bottom: 0;
}

.story table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.story th,
.story td {
  border: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
}

/* ---------- 侧栏 ---------- */

.side-notes {
  grid-column: 1;
  padding: 1.7rem 1rem 2.3rem;
  border-top: 1px solid var(--copper-soft);
  background: rgba(231, 222, 206, 0.45);
}

.side-notes h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.26em;
}

.side-notes .subtitle {
  margin: 0.25rem 0 1rem;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.note-links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.note-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.note-links a::before {
  content: "·";
  margin-right: 0.6rem;
  color: var(--copper);
}

.note-links a:hover {
  color: #8A6F47;
}

.totop {
  margin: 1.1rem 0 0;
}

.totop a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--copper-soft);
}

/* ---------- 页脚 ---------- */

.colophon {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.9rem;
  padding: 2rem 1rem 2.4rem;
  border-top: 3px double var(--copper-soft);
  background: rgba(231, 222, 206, 0.35);
}

.cta {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.3rem 1rem;
  text-align: center;
  border: 1px solid var(--copper);
  border-radius: 4px;
  background: rgba(200, 169, 126, 0.14);
}

.cta a {
  font-size: clamp(1.25rem, 4.2vw, 1.8rem);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--ink);
  text-decoration: none;
}

.f-col {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.f-col a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
}

.f-col a:hover {
  color: #8A6F47;
}

.colophon small {
  grid-column: 1 / -1;
  padding-top: 0.9rem;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.18em;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------- 滚入 ---------- */

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .layer {
    transform: none !important;
  }
}

/* ---------- 宽屏 ---------- */

@media (min-width: 640px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 1.8rem;
    padding: 2rem 1.6rem 5.6rem;
  }

  .hero-media {
    min-height: 52vh;
    grid-column: 1;
  }

  .hero-type {
    grid-column: 2;
  }

  .story > article:not(.hero) {
    padding: 2.6rem 1.6rem;
  }

  .side-notes {
    padding: 1.8rem 1.6rem 2.4rem;
  }

  .colophon {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 2.4rem 1.6rem 2.6rem;
  }

  .f-col a {
    min-height: 40px;
  }
}

@media (min-width: 900px) {
  .menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    padding: 0.3rem 1.4rem 0.6rem;
  }

  .js .menu-summary {
    display: none;
  }

  .menu-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.5rem;
    margin: 0;
  }

  .menu-list a {
    min-height: 44px;
    padding: 0.55rem 0.1rem;
    border-bottom: 1px solid transparent;
    letter-spacing: 0.14em;
  }

  .menu-list a:hover {
    border-bottom-color: var(--copper);
  }

  .story {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
    column-gap: 3rem;
    padding-inline: 1.6rem;
  }

  .story > .hero {
    grid-column: 1 / -1;
    margin-inline: -1.6rem;
    padding-inline: 2.2rem;
  }

  .story > article:not(.hero) {
    padding: 3rem 0;
  }

  .side-notes {
    grid-column: 2;
    align-self: start;
    position: sticky;
    top: 8rem;
    margin-top: 3rem;
    border: 1px solid var(--copper-soft);
    border-radius: 4px;
    padding: 1.2rem 1rem;
  }

  .colophon {
    padding-inline: 2.2rem;
  }
}

@media (min-width: 1100px) {
  .hero-type h1 {
    font-size: 4rem;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
