@import url('https://fonts.googleapis.com/css2?family=Karla:wght@300;400;500;600;700&family=Playfair+Display+SC:wght@400;700&display=swap');

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

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --muted: #40604f;
  --line: rgba(23, 38, 32, .84);
  --clay: inset -4px -4px 0 rgba(255, 255, 255, .78), inset 4px 4px 0 rgba(23, 38, 32, .05), 0 8px 0 rgba(23, 38, 32, .15), 0 16px 28px rgba(23, 38, 32, .12);
  --clay-sm: inset -3px -3px 0 rgba(255, 255, 255, .7), 0 5px 0 rgba(23, 38, 32, .13), 0 9px 16px rgba(23, 38, 32, .1);
  --r: 28px;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font: 400 17px/1.75 Karla, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(60vw 50vw at 88% -8%, rgba(173, 216, 230, .72), transparent 70%),
    radial-gradient(52vw 42vw at 5% 3%, rgba(180, 253, 225, .9), transparent 70%),
    radial-gradient(76vw 60vw at 50% 112%, rgba(173, 216, 230, .5), transparent 70%),
    linear-gradient(180deg, #f7fffb 0%, #eefaf4 46%, #f6fdff 100%);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 16px; }

h1, h2, h3 {
  font-family: "Playfair Display SC", "Songti SC", Georgia, serif;
  line-height: 1.22;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: .01em;
}

div { scroll-margin-top: 96px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- 顶部 ---------- */
.top { max-width: 1180px; margin: 0 auto; padding: 16px 18px 0; }

.top-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(158deg, #ffffff, #eafff5 70%, #eef9ff);
  box-shadow: var(--clay);
}

.badge {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(150deg, var(--mint), var(--sky));
  box-shadow: var(--clay-sm);
  font-family: "Playfair Display SC", serif;
  font-size: 22px;
  font-weight: 700;
  transition: transform .2s ease-out;
}
.badge:hover { transform: rotate(-6deg) scale(1.05); }
.badge img { width: 30px; height: 30px; object-fit: contain; }

.find {
  flex: 1 1 190px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 16px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--clay-sm);
}
.find svg { flex: 0 0 auto; width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2.4; stroke-linecap: round; }
.find input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.find input::placeholder { color: #6d8a7c; }

.menu {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.menu::-webkit-scrollbar { display: none; }

.menu a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 0 rgba(23, 38, 32, .14);
  transition: transform .2s ease-out, background .2s ease-out, box-shadow .2s ease-out;
}
.menu a .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: linear-gradient(150deg, var(--mint), var(--sky));
}
.menu a:hover { background: var(--mint); transform: translateY(-2px); }
.menu a:active { transform: translateY(2px); box-shadow: none; }

/* ---------- 粘性锚点条 ---------- */
.subbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin-top: 14px;
  padding: 8px 0;
  background: rgba(247, 255, 251, .88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  transition: box-shadow .25s ease-out;
}
.subbar.is-stuck { box-shadow: 0 8px 18px rgba(23, 38, 32, .14); }

.subbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subbar-inner::-webkit-scrollbar { display: none; }

.subbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #effff8;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s ease-out;
}
.subbar a:hover { background: var(--sky); }

/* ---------- 主体骨架 ---------- */
.stage { max-width: 1180px; margin: 0 auto; padding: 26px 18px 0; }

.clay-sheet {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  gap: 24px 26px;
  align-items: start;
}

/* ---------- 侧栏 ---------- */
.rail {
  grid-column: 1;
  grid-row: 1 / span 4;
  position: sticky;
  top: 74px;
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(170deg, #ffffff, #e9fff6);
  box-shadow: var(--clay);
}

.rail-head {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 3px dashed rgba(23, 38, 32, .3);
  font-family: "Playfair Display SC", serif;
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  transition: background .2s ease-out, transform .2s ease-out;
}
.rail-link .num {
  font-family: "Playfair Display SC", serif;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--muted);
}
.rail-link:hover { background: var(--mint); transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  grid-column: 2;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  padding: 36px 30px;
  border: 3px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(155deg, #ffffff 0%, #e6fff5 55%, #d9eefb 100%);
  box-shadow: var(--clay);
}

.hero-word {
  position: absolute;
  left: -8px;
  bottom: -10px;
  z-index: 0;
  font-family: "Playfair Display SC", serif;
  font-size: clamp(56px, 15vw, 178px);
  line-height: .82;
  letter-spacing: -.02em;
  color: rgba(23, 38, 32, .085);
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

.hero-copy { position: relative; z-index: 1; flex: 1 1 330px; min-width: 0; }

.eyebrow {
  display: inline-block;
  padding: 5px 15px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--sky);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(23, 38, 32, .16);
}

.hero h1 { font-size: clamp(30px, 6.4vw, 58px); margin: 16px 0 12px; }
.lede { max-width: 46ch; color: var(--muted); margin: 0 0 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 26px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(150deg, var(--mint), var(--sky));
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 6px 0 rgba(23, 38, 32, .2);
  transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(23, 38, 32, .2); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(23, 38, 32, .2); }

.hero-art { position: relative; z-index: 1; flex: 0 1 230px; display: grid; place-items: center; }
.hero-img { width: 100%; max-width: 240px; border: 3px solid var(--line); border-radius: 26px; box-shadow: var(--clay); }

.hero-blob {
  width: 172px;
  height: 172px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 52% 48% 46% 54% / 54% 46% 54% 46%;
  background: linear-gradient(150deg, var(--mint), var(--sky));
  box-shadow: var(--clay);
  font-family: "Playfair Display SC", serif;
  font-size: 58px;
  animation: bob 5.5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* ---------- 正文 ---------- */
.body-box {
  grid-column: 2;
  padding: 30px 28px 34px;
  border: 3px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, .58);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--clay);
}

.shelf-title { font-size: clamp(24px, 4vw, 34px); margin-bottom: 10px; }

hr { border: 0; border-top: 3px dashed rgba(23, 38, 32, .3); margin: 24px 0; }
hr.rule { margin: 0 0 20px; border-top: 4px solid rgba(23, 38, 32, .35); }

.prose { overflow-wrap: anywhere; }
.prose div { padding-top: 4px; }
.prose div + div { margin-top: 34px; padding-top: 30px; border-top: 3px solid rgba(23, 38, 32, .16); }
.prose h2 { font-size: clamp(22px, 3.6vw, 30px); margin-top: 0; }
.prose h3 { font-size: 20px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin: 0 0 8px; }
.prose a { font-weight: 700; border-bottom: 3px solid var(--sky); }
.prose blockquote {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: #eafff5;
  box-shadow: var(--clay-sm);
}
.prose img { margin: 0 0 16px; border: 3px solid var(--line); border-radius: 22px; box-shadow: var(--clay-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { border: 2px solid rgba(23, 38, 32, .25); padding: 8px 10px; text-align: left; }

.js .prose div { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s cubic-bezier(.34, 1.4, .64, 1); }
.js .prose div.in { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.foot { max-width: 1180px; margin: 34px auto 0; padding: 0 18px 32px; }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 26px;
  border: 3px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(140deg, var(--mint), var(--sky));
  box-shadow: var(--clay);
}
.cta-word { margin: 0; font-family: "Playfair Display SC", serif; font-size: clamp(24px, 4.5vw, 38px); font-weight: 700; }

.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.foot-cols dl {
  margin: 0;
  padding: 16px;
  border: 3px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--clay-sm);
}
.foot-cols dt {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 3px dashed rgba(23, 38, 32, .28);
  font-family: "Playfair Display SC", serif;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.foot-cols dd { margin: 0; }
.foot-cols a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 6px;
  border-radius: 12px;
  font-size: 16px;
  transition: background .2s ease-out;
}
.foot-cols a:hover { background: var(--mint); }

.copy { margin: 22px 0 0; text-align: center; font-size: 16px; color: var(--muted); }

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .clay-sheet { grid-template-columns: minmax(0, 1fr); }
  .rail {
    grid-column: 1;
    grid-row: auto;
    order: 2;
    position: static;
  }
  .hero { grid-column: 1; order: 1; }
  .body-box { grid-column: 1; order: 3; }
}

@media (max-width: 620px) {
  .top { padding-top: 12px; }
  .hero { min-height: 0; padding: 24px 18px; border-radius: 28px; gap: 18px; }
  .hero-art { flex: 0 0 100%; justify-items: start; }
  .hero-blob { width: 132px; height: 132px; font-size: 44px; }
  .body-box { padding: 22px 16px 26px; border-radius: 26px; }
  .cta { padding: 20px; border-radius: 26px; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .stage { padding-top: 20px; }
  .rail-link, .menu a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

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