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

:root {
  --ink: #26171a;
  --rose: #eb879c;
  --blush: #ffb6c1;
  --paper: #fff8f6;
  --card: #ffffff;
  --muted: #7a5a60;
  --link: #a83f57;
  --radius: 18px;
  --soft: 0 2px 6px rgba(38, 23, 26, .05), 0 14px 30px -16px rgba(38, 23, 26, .28);
  --soft-lift: 0 4px 10px rgba(38, 23, 26, .08), 0 22px 44px -20px rgba(38, 23, 26, .34);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

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

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

body {
  margin: 0;
  padding-bottom: 86px;
  font-family: 'Atkinson Hyperlegible', 'Crimson Pro', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Crimson Pro', Georgia, 'Songti SC', 'PingFang SC', serif;
  font-weight: 600;
  letter-spacing: -.005em;
}

a { color: var(--link); }

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(38, 23, 26, .97);
  border-top: 1px solid rgba(255, 182, 193, .38);
  box-shadow: 0 -10px 30px -18px rgba(38, 23, 26, .85);
}

.mark {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--blush);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38vw;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color .22s var(--ease);
}

.mark:hover { color: #fff; }

.burger {
  display: none;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 182, 193, .45);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background .22s var(--ease);
}

.burger:hover { background: rgba(235, 135, 156, .25); }

.dockNav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.dockNav::-webkit-scrollbar { display: none; }

.dockNav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dockNav li:nth-child(2) { margin-left: 10px; }
.dockNav li:nth-child(5) { margin-left: 10px; }
.dockNav li:nth-child(2),
.dockNav li:nth-child(5) {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 182, 193, .3);
}

.dockNav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 16px;
  line-height: 1.3;
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  border-radius: 10px;
  white-space: nowrap;
  transition: background .22s var(--ease), color .22s var(--ease);
}

.dockNav a:hover { background: rgba(255, 182, 193, .22); color: #fff; }

.dockNav a[aria-current] {
  background: var(--rose);
  color: var(--ink);
  font-weight: 700;
}

.find {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.find input {
  width: 118px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 182, 193, .42);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
}

.find input::placeholder { color: rgba(255, 255, 255, .62); }

.find button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--rose);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .22s var(--ease), background .22s var(--ease);
}

.find button:hover { background: var(--blush); transform: translateY(-1px); }

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 76px 24px 148px;
  overflow: hidden;
  background:
    radial-gradient(120% 88% at 10% 6%, #ffffff 0%, #fdeef1 44%, #ffd9e0 100%);
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 15ch;
  font-size: clamp(2.5rem, 9vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 108px;
  background: var(--rose);
  opacity: .62;
  clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 100%);
}

.hero .down {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin-top: 40px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(38, 23, 26, .55);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease);
}

.hero .down:hover {
  transform: translateY(4px);
  box-shadow: 0 14px 26px -12px rgba(38, 23, 26, .6);
}

/* ---------- 主体 ---------- */

main { background: var(--paper); }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 58px 24px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 40px;
  align-items: start;
}

.prose {
  counter-reset: sec;
  display: block;
}

.prose article {
  position: relative;
  counter-increment: sec;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--soft);
  padding: 30px 28px 22px;
  margin: 0 0 24px;
  scroll-margin-top: 92px;
  scroll-margin-bottom: 104px;
  transition: box-shadow .26s var(--ease), transform .26s var(--ease);
}

.prose article::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 15px;
  letter-spacing: .12em;
  color: #c99aa5;
}

.prose article:hover {
  box-shadow: var(--soft-lift);
  transform: translateY(-2px);
}

.prose article:last-child { margin-bottom: 0; }

.prose h2 {
  margin: 0 0 .55em;
  padding-right: 44px;
  font-size: clamp(1.45rem, 3.4vw, 1.85rem);
  line-height: 1.28;
}

.prose h3 {
  margin: 1.4em 0 .5em;
  font-size: 1.22rem;
  line-height: 1.35;
}

.prose p { margin: 0 0 1em; }

.prose ul,
.prose ol { margin: 0 0 1em; padding-left: 1.3em; }

.prose li { margin: 0 0 .4em; }

.prose strong { font-weight: 700; }

.prose a {
  color: var(--link);
  text-underline-offset: 3px;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.prose blockquote {
  margin: 0 0 1em;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--blush);
  color: #4a3236;
}

/* ---------- 右栏 ---------- */

.rail {
  position: sticky;
  top: 26px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--soft);
  padding: 22px 20px;
}

.rail small {
  display: block;
  font-size: 16px;
  letter-spacing: .18em;
  color: var(--muted);
}

.rail h2 {
  margin: .1em 0 .7em;
  font-size: 1.42rem;
  line-height: 1.2;
}

.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 10px;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background .2s var(--ease), border-color .2s var(--ease), padding-left .2s var(--ease);
}

.rail a:hover {
  background: #fff0f3;
  border-left-color: var(--rose);
  padding-left: 14px;
}

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

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 64px 24px 30px;
  background: #2a1a1e;
  color: #f7e9ec;
}

footer .sign {
  margin: 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: clamp(2rem, 8vw, 4.4rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--blush);
}

footer .tail {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

footer small {
  font-size: 16px;
  color: #e6cfd4;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  text-underline-offset: 3px;
}

/* ---------- 回顶 ---------- */

.totop {
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  text-decoration: none;
  box-shadow: var(--soft);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

.totop:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-lift);
}

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

@media (max-width: 1000px) {
  .wrap { grid-template-columns: minmax(0, 1fr) 232px; gap: 28px; }
  .find input { width: 96px; }
}

@media (max-width: 860px) {
  .js .burger { display: inline-flex; align-items: center; }
  .js .dockNav { display: none; }
  .js .dock.open .dockNav {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    max-height: 62vh;
    overflow-y: auto;
    padding: 14px 16px;
    background: #2a1a1e;
    border-top: 1px solid rgba(255, 182, 193, .4);
    box-shadow: 0 -16px 34px -18px rgba(0, 0, 0, .8);
  }
  .js .dock.open .dockNav ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .js .dock.open .dockNav li { border-left: 0; padding-left: 0; margin-left: 0; }
  .js .dock.open .dockNav a {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    background: rgba(255, 255, 255, .06);
  }
  .find input { width: 84px; }
  .find button { padding: 0 10px; }
  .mark { max-width: 30vw; font-size: 17px; }
}

@media (max-width: 820px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 40px 18px 60px;
    gap: 26px;
  }
  .rail { position: static; }
  .prose article { padding: 26px 20px 18px; border-radius: 16px; }
  .hero { padding: 66px 18px 132px; }
  footer { padding: 52px 18px 26px; }
}

@media (max-width: 420px) {
  .find input { width: 72px; }
  .find button { display: none; }
  .mark { max-width: 34vw; }
  .prose article::before { top: 18px; right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .prose article:hover,
  .totop:hover,
  .hero .down:hover,
  .find button:hover { transform: none; }
}

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