@import url('https://fonts.googleapis.com/css2?family=Anton&family=Epilogue:wght@400;500;600;700&display=swap');

:root{
  --pink:#eb879c;
  --pink-soft:#ffb6c1;
  --ink:#26171a;
  --paper:#fff6f8;
  --card:#ffffff;
  --line:rgba(38,23,26,.15);
  --line-strong:rgba(38,23,26,.28);
  --radius:28px;
  --top:104px;
}

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

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

body{
  margin:0;
  font-family:Epilogue,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -12%, #ffe1e8 0%, rgba(255,225,232,0) 62%),
    radial-gradient(820px 480px at -8% 18%, #fff0f4 0%, rgba(255,240,244,0) 58%),
    linear-gradient(180deg,#fff8fa 0%, var(--paper) 100%);
  background-attachment:fixed;
}

img,svg,iframe,video,table,pre,figure{max-width:100%}
img{height:auto}
img,iframe,video{height:auto}

a{color:inherit}

h1,h2,h3{
  font-family:Anton,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-weight:400;
  line-height:1.16;
  letter-spacing:.012em;
  margin:0 0 .45em;
  overflow-wrap:anywhere;
}

h1{font-size:clamp(30px,5.6vw,56px)}
h2{font-size:clamp(23px,3.4vw,34px)}
h3{font-size:clamp(19px,2.4vw,24px)}
p{margin:0 0 1em;overflow-wrap:anywhere}
ul,ol{margin:0 0 1em;padding-left:1.25em}
li{margin:.35em 0;overflow-wrap:anywhere}

hr{
  border:0;
  height:4px;
  width:70px;
  margin:.55em 0 1.1em;
  border-radius:3px;
  background:linear-gradient(90deg,var(--pink),var(--pink-soft));
}

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

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

.skip{
  position:fixed;
  top:10px;left:12px;
  z-index:60;
  padding:12px 18px;
  background:var(--ink);
  color:#fff;
  border-radius:14px;
  text-decoration:none;
  font-size:16px;
}

.shell{
  max-width:1080px;
  margin:0 auto;
  padding:0 18px 40px;
  overflow-x:clip;
}

/* ---------- 顶部 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:30;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin:0 -18px 20px;
  padding:10px 18px;
  background:rgba(255,246,248,.9);
  backdrop-filter:blur(12px);
  border-bottom:2px solid var(--line);
  border-radius:0 0 26px 26px;
  max-width:100vw;
}

.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:18px;
  border:2px solid var(--line-strong);
  background:linear-gradient(140deg,#fff 0%,#ffe6ec 100%);
  text-decoration:none;
  overflow:hidden;
  flex:0 0 auto;
}

.mark-img{width:100%;height:100%;object-fit:cover}
.mark-txt{
  font-family:Anton,sans-serif;
  font-size:22px;
  line-height:1;
  color:var(--ink);
}

.topnav{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  padding:4px 2px;
  -webkit-overflow-scrolling:touch;
}

.navlink{
  display:inline-flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
  min-height:44px;
  padding:9px 14px;
  border-radius:999px;
  border:2px solid transparent;
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  white-space:nowrap;
  transition:background .24s ease,border-color .24s ease,color .24s ease;
}

.navlink .ni{color:var(--pink);flex:0 0 auto;transition:color .24s ease}

.navlink:hover,.navlink:focus-visible{
  background:#fff;
  border-color:var(--pink-soft);
  color:#a83e58;
}

.navlink:hover .ni,.navlink:focus-visible .ni{color:#a83e58}
.navlink.hide{display:none}

.search{
  position:relative;
  flex:0 0 auto;
  display:flex;
  align-items:center;
}

.search input{
  width:132px;
  min-height:44px;
  padding:9px 34px 9px 14px;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  background:#fff;
  border:2px solid var(--line);
  border-radius:999px;
  transition:border-color .24s ease,width .24s ease;
  -webkit-appearance:none;
  appearance:none;
}

.search input::placeholder{color:#8a6a72}
.search input:focus{border-color:var(--pink);width:172px}

.search-ring{
  position:absolute;
  right:13px;
  width:13px;height:13px;
  border:2px solid var(--pink);
  border-radius:50%;
  pointer-events:none;
}

.search-ring::after{
  content:"";
  position:absolute;
  right:-5px;
  bottom:-3px;
  width:6px;
  height:2px;
  border-radius:2px;
  background:var(--pink);
  transform:rotate(45deg);
}

/* ---------- 头图 ---------- */
.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:16px;
  min-height:45vh;
  padding:26px 20px 22px;
  border:2px solid var(--line-strong);
  border-radius:34px;
  background:
    radial-gradient(520px 240px at 50% -30%, #fff 0%, rgba(255,255,255,0) 70%),
    linear-gradient(160deg,#fff2f6 0%,#ffdfe7 58%,#ffcdd9 100%);
  text-align:center;
  overflow:hidden;
}

.hero-copy{max-width:660px;margin:0 auto;min-width:0}

.badge{
  display:inline-block;
  max-width:100%;
  margin:0 0 14px;
  padding:5px 16px;
  font-size:15px;
  font-weight:600;
  letter-spacing:.02em;
  color:#9c3a52;
  background:#fff;
  border:2px solid var(--pink);
  border-radius:999px;
  transform:rotate(-1.5deg);
}

.hero h1{margin:0 0 .3em}

.lede{
  margin:0 auto;
  max-width:44ch;
  font-size:17px;
  color:#4a2f35;
}

.hero-fig{
  margin:6px auto 0;
  width:100%;
  max-width:720px;
  min-width:0;
  border:2px solid var(--line-strong);
  border-radius:26px;
  overflow:hidden;
  background:#fff;
}

.hero-fig .hero-img{
  display:block;
  width:100%;
  max-width:100%;
  height:min(30vh,260px);
  object-fit:cover;
}

/* ---------- 主体 ---------- */
.split{
  display:grid;
  grid-template-columns:minmax(0,214px) minmax(0,1fr);
  align-items:start;
  gap:24px;
  margin-top:26px;
  min-width:0;
}

.rail{
  position:sticky;
  top:var(--top);
  padding:18px 16px;
  background:var(--card);
  border:2px solid var(--line);
  border-radius:var(--radius);
  min-width:0;
}

.rail h2{
  font-size:22px;
  margin:0 0 .2em;
}

.rail hr{width:44px;height:3px;margin:.1em 0 .8em}

.rail-list{list-style:none;margin:0;padding:0}

.rail-list li{margin:0;min-width:0}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:6px 8px;
  font-size:16px;
  text-decoration:none;
  border-radius:14px;
  transition:background .22s ease,color .22s ease;
}

.rail-list a::before{
  content:"";
  width:7px;height:7px;
  margin-right:9px;
  border-radius:50%;
  border:2px solid var(--pink);
  flex:0 0 auto;
}

.rail-list a:hover,.rail-list a:focus-visible{background:#fff2f6;color:#a83e58}

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

.prose > section{
  margin:0 0 22px;
  padding:22px 20px 24px;
  background:var(--card);
  border:2px solid var(--line);
  border-radius:var(--radius);
  scroll-margin-top:var(--top);
  min-width:0;
  overflow-x:clip;
}

.prose > section:first-child{margin-top:0}
.prose > section:last-child{margin-bottom:0}

.prose h2,.prose h3{margin-top:0}
.prose h2 + hr,.prose h3 + hr{margin-top:-.1em}

.prose p:last-child,.prose ul:last-child,.prose ol:last-child{margin-bottom:0}

.prose img{max-width:100%;height:auto}

.prose figure{
  margin:0 0 1em;
  padding:12px;
  border:2px solid var(--line);
  border-radius:22px;
  background:#fff7f9;
  min-width:0;
}

.prose figcaption{font-size:15px;color:#6d5158;overflow-wrap:anywhere}

.prose figure img{border-radius:14px;display:block;max-width:100%;height:auto}

.prose iframe,.prose video{width:100%;max-width:100%;border:0;border-radius:16px}

.prose a{color:#a83e58;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}

.prose pre{
  display:block;
  max-width:100%;
  overflow-x:auto;
  padding:12px 14px;
  border:2px solid var(--line);
  border-radius:16px;
  background:#fff7f9;
  font-size:15px;
  line-height:1.6;
}

.prose code{overflow-wrap:anywhere}

.prose blockquote{
  margin:0 0 1em;
  padding:12px 18px;
  border-left:5px solid var(--pink);
  border-radius:0 18px 18px 0;
  background:#fff4f7;
}

.prose table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  font-size:16px;
  margin:0 0 1em;
}

.prose th,.prose td{
  padding:9px 11px;
  border:2px solid var(--line);
  text-align:left;
  overflow-wrap:anywhere;
}

.prose th{background:#fff1f5}

/* ---------- 页脚 ---------- */
.site-foot{
  margin-top:42px;
  padding:24px 18px 30px;
  border:2px solid var(--line);
  border-radius:34px;
  background:linear-gradient(180deg,#fff 0%,#fff4f7 100%);
}

.cta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:14px 22px;
  padding:30px 20px;
  border:2px solid var(--line-strong);
  border-radius:30px;
  background:
    radial-gradient(420px 200px at 50% 0%, #fff 0%, rgba(255,255,255,0) 70%),
    linear-gradient(135deg,#ffd6e0 0%,#ffc3d1 100%);
  text-align:center;
}

.cta-brand{
  margin:0;
  font-family:Anton,"PingFang SC",sans-serif;
  font-size:clamp(26px,4.4vw,38px);
  line-height:1.1;
  overflow-wrap:anywhere;
}

.cta-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:11px 26px;
  font-size:16px;
  font-weight:600;
  text-decoration:none;
  color:#fff;
  background:var(--ink);
  border:2px solid var(--ink);
  border-radius:999px;
  transition:background .24s ease,color .24s ease;
}

.cta-btn:hover,.cta-btn:focus-visible{background:#fff;color:var(--ink)}

.foot-nav{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin:26px 0 0;
  min-width:0;
}

.foot-nav dl{margin:0;padding:14px 16px;border:2px solid var(--line);border-radius:22px;background:#fff;min-width:0}

.foot-nav dt{
  font-size:15px;
  font-weight:600;
  letter-spacing:.08em;
  color:#9c3a52;
  margin-bottom:6px;
}

.foot-nav dd{margin:0;overflow-wrap:anywhere}

.foot-nav dd.plain{font-size:16px;padding:8px 0}

.foot-nav a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:6px 0;
  font-size:16px;
  text-decoration:none;
  color:#3d272d;
  transition:color .22s ease;
  overflow-wrap:anywhere;
}

.foot-nav a:hover,.foot-nav a:focus-visible{color:#a83e58;text-decoration:underline;text-underline-offset:3px}

.copy{
  margin:24px 0 0;
  font-size:15px;
  text-align:center;
  color:#6d5158;
  overflow-wrap:anywhere;
}

/* ---------- 动效 ---------- */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .28s ease,transform .28s ease;
}

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

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .navlink,.search input,.rail-list a,.cta-btn,.foot-nav a{transition:none}
}

/* ---------- 断点 ---------- */
@media (max-width:900px){
  .split{grid-template-columns:minmax(0,1fr);gap:18px}
  .rail{position:static;padding:16px}
  .rail-list{display:flex;flex-wrap:wrap;gap:6px}
  .rail-list a{min-height:40px;padding:6px 12px;border:2px solid var(--line);border-radius:999px}
  .rail-list a::before{display:none}
}

@media (max-width:780px){
  :root{--top:112px}
  .shell{padding:0 14px 34px}
  .topbar{
    grid-template-columns:auto minmax(0,1fr);
    grid-template-areas:"mark search" "nav nav";
    margin:0 -14px 18px;
    padding:10px 14px;
    gap:8px;
  }
  .mark{grid-area:mark}
  .search{grid-area:search;justify-self:end}
  .topnav{grid-area:nav;padding:2px 0 4px}
  .search input{width:116px}
  .search input:focus{width:140px}
  .hero{min-height:auto;padding:22px 16px 18px;border-radius:28px}
  .hero-fig .hero-img{height:min(26vh,200px)}
  .prose > section{padding:18px 15px 20px;border-radius:24px}
  .foot-nav{grid-template-columns:minmax(0,1fr);gap:12px}
  .site-foot{padding:18px 14px 24px;border-radius:28px}
}

@media (min-width:1100px){
  .hero{padding:34px 32px 28px}
}

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