@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

:root {
  --paper: #f5e6c8;
  --paper-deep: #ecd9b2;
  --cream: #fdf6e5;
  --caramel: #d4a574;
  --caramel-deep: #b3813f;
  --ink: #262117;
  --faded: #6f6150;
  --line: rgba(38, 33, 23, 0.18);
  --rail: 218px;
  --serif: "Great Vibes", "Cormorant Infant", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --body: "Cormorant Infant", "Songti SC", "STSong", "SimSun", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  padding-left: var(--rail);
  overflow-x: hidden;
  max-width: 100%;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 38;
  background:
    radial-gradient(36vw 28vw at 88% 3%, rgba(255, 166, 84, 0.55), transparent 70%),
    radial-gradient(30vw 24vw at 3% 92%, rgba(255, 209, 152, 0.45), transparent 72%);
  mix-blend-mode: soft-light;
}

body::after {
  z-index: 39;
  opacity: 0.3;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

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

.skip {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 60;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  font-size: 16px;
}

.skip:focus {
  top: 0;
}

/* ---------- 左侧固定轨道 ---------- */

.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail);
  max-width: 100%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px 28px;
  background: var(--paper-deep);
  border-right: 1px dashed var(--line);
  overflow-y: auto;
  overflow-x: hidden;
}

.ticker {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--caramel-deep);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid var(--caramel);
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  align-self: flex-start;
  box-shadow: 0 2px 0 rgba(38, 33, 23, 0.08);
}

.mark img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  filter: sepia(0.3) contrast(1.05);
}

.mark-glyph {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.04em;
}

.rail-nav {
  min-width: 0;
  max-width: 100%;
}

.rail-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.25s ease, color 0.25s ease;
}

.rail-nav a b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  color: var(--caramel-deep);
  letter-spacing: 0.06em;
  flex: none;
}

.rail-nav a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--cream);
  color: var(--caramel-deep);
}

/* ---------- 头图 ---------- */

main {
  max-width: 100%;
  overflow-x: clip;
}

.hero {
  position: relative;
  min-height: max(45vh, 300px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(38, 33, 23, 0.05) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(38, 33, 23, 0.05) 0 1px, transparent 1px 22px),
    linear-gradient(160deg, #e7d0a6, #cfa878 70%, #b98d5d);
  padding: 34px clamp(18px, 5vw, 56px) 34px;
  isolation: isolate;
}

.hero-fig {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.4) contrast(1.06) saturate(0.78) brightness(0.9);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(38, 33, 23, 0.68) 0%, rgba(38, 33, 23, 0.32) 52%, rgba(38, 33, 23, 0.12) 100%);
}

.scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(38, 33, 23, 0.08) 0 1px, transparent 1px 5px);
  animation: vhs 9s ease-in-out infinite;
  opacity: 0.55;
}

@keyframes vhs {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(2px); }
  70% { transform: translateY(0.5px); }
}

.hero-in {
  position: relative;
  max-width: 640px;
  min-width: 0;
  color: var(--cream);
  text-shadow: 0 1px 14px rgba(38, 33, 23, 0.5);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.34em;
  color: rgba(253, 246, 229, 0.86);
  overflow-wrap: anywhere;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  overflow-wrap: break-word;
}

.lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(253, 246, 229, 0.9);
  max-width: 46ch;
  overflow-wrap: break-word;
}

/* ---------- 正文区 ---------- */

.body-wrap {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 54px);
  padding: 42px clamp(16px, 4.2vw, 46px) 56px;
  align-items: start;
  max-width: 100%;
  overflow-x: clip;
}

.aside-box {
  position: sticky;
  top: 22px;
  min-width: 0;
  max-width: 100%;
  background: var(--cream);
  border-radius: 10px;
  padding: 16px 14px 18px;
  box-shadow: 0 2px 0 rgba(38, 33, 23, 0.08);
}

.aside-box h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
}

.aside-box hr {
  margin: 0 0 12px;
}

.aside-box ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 100%;
}

.aside-box li {
  min-width: 0;
}

.aside-box a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 6px;
  font-size: 16px;
  color: var(--faded);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}

.aside-box a b {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--caramel-deep);
  font-size: 14px;
  flex: none;
}

.aside-box a span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.aside-box a:hover,
.aside-box a:focus-visible {
  color: var(--ink);
}

.polaroid {
  margin: 18px 0 0;
  padding: 9px 9px 8px;
  background: #fffaf0;
  border: 1px solid rgba(38, 33, 23, 0.12);
  border-radius: 2px;
  transform: rotate(-2.4deg);
  box-shadow: 0 8px 18px rgba(38, 33, 23, 0.16);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: sepia(0.45) contrast(1.05) saturate(0.72);
}

.polaroid figcaption {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-align: center;
  color: var(--faded);
  padding-top: 6px;
}

.entry {
  max-width: 720px;
  min-width: 0;
  overflow-wrap: break-word;
}

.entry > * {
  max-width: 100%;
}

.entry > section {
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.entry > section:last-child {
  border-bottom: 0;
}

.entry h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  overflow-wrap: break-word;
}

.entry h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 22px 0 8px;
  overflow-wrap: break-word;
}

hr {
  border: 0;
  height: 1px;
  margin: 14px 0 18px;
  background: linear-gradient(90deg, var(--caramel), rgba(212, 165, 116, 0));
}

.entry p {
  margin: 0 0 16px;
  overflow-wrap: break-word;
}

.entry a {
  color: var(--caramel-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.entry ul,
.entry ol {
  padding-left: 1.3em;
  margin: 0 0 16px;
}

.entry li {
  margin-bottom: 8px;
  overflow-wrap: break-word;
}

.entry blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--caramel);
  background: rgba(253, 246, 229, 0.7);
  color: var(--faded);
  max-width: 100%;
}

.entry img {
  border-radius: 10px;
  filter: sepia(0.28) saturate(0.86);
  max-width: 100%;
  height: auto;
}

.entry figure {
  margin: 0 0 18px;
  max-width: 100%;
}

.entry figcaption {
  font-size: 14px;
  color: var(--faded);
  padding-top: 6px;
  overflow-wrap: break-word;
}

.entry pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 12px 14px;
  background: rgba(38, 33, 23, 0.06);
  border-radius: 10px;
  font-size: 15px;
}

.entry iframe,
.entry video,
.entry svg {
  max-width: 100%;
}

.entry table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 16px;
}

.entry th,
.entry td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
}

.entry th {
  background: rgba(212, 165, 116, 0.2);
}

section[id] {
  scroll-margin-top: 88px;
}

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

.foot {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr auto;
  gap: 22px;
  align-items: start;
  padding: 40px clamp(18px, 4vw, 44px) 30px;
  background: var(--paper-deep);
  border-top: 1px dashed var(--line);
  max-width: 100%;
  overflow-x: clip;
}

.foot > * {
  min-width: 0;
}

.foot-mark {
  margin-bottom: 10px;
}

.foot-brand {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  overflow-wrap: break-word;
}

.to-top {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--caramel-deep);
  border-radius: 999px;
  color: var(--caramel-deep);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.to-top:hover,
.to-top:focus-visible {
  background: var(--caramel-deep);
  color: var(--cream);
}

.foot-nav dl {
  margin: 0;
  max-width: 100%;
}

.foot-nav dt {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--caramel-deep);
  margin-bottom: 8px;
}

.foot-nav dd {
  margin: 0;
}

.foot-nav a {
  display: inline-block;
  padding: 9px 0;
  min-height: 40px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  overflow-wrap: anywhere;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  border-bottom-color: var(--caramel-deep);
  color: var(--caramel-deep);
}

.foot-note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--faded);
  overflow-wrap: break-word;
}

.foot-legal {
  justify-self: end;
  text-align: right;
}

.foot-legal p {
  margin: 0;
  font-size: 15px;
  color: var(--faded);
  letter-spacing: 0.05em;
}

/* ---------- 显隐动效 ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.polaroid.reveal.in {
  transform: rotate(-2.4deg);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .body-wrap {
    grid-template-columns: 196px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  body {
    padding-left: 0;
  }

  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    flex-flow: row wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    background: var(--paper-deep);
  }

  .ticker {
    display: none;
  }

  .mark {
    width: 42px;
    height: 42px;
  }

  .rail-nav {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .rail-nav ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    width: auto;
    max-width: 100%;
  }

  .rail-nav li {
    min-width: 0;
  }

  .rail-nav a {
    white-space: normal;
    padding: 9px 11px;
    min-height: 44px;
    background: rgba(253, 246, 229, 0.7);
    font-size: 15px;
  }

  .hero {
    min-height: 42vh;
    padding: 24px 18px;
  }

  .hero-in {
    max-width: 100%;
  }

  .body-wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 16px 40px;
    gap: 20px;
  }

  .aside-box {
    position: static;
    max-width: 100%;
  }

  .aside-box ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
  }

  .entry {
    max-width: 100%;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 28px 16px 24px;
  }

  .foot-legal {
    justify-self: start;
    text-align: left;
  }

  .foot-nav dd {
    display: inline-block;
    margin-right: 16px;
  }
}

@media (max-width: 420px) {
  .aside-box ol {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px 14px;
  }

  .body-wrap {
    padding: 22px 14px 34px;
  }

  .foot {
    padding: 24px 14px 20px;
  }

  .rail-nav a {
    padding: 9px 10px;
    font-size: 15px;
  }
}

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

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

  .scan {
    animation: none;
  }
}

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