@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

:root{
  --blue:#c8e0f4;
  --pink:#f5e0e8;
  --ink:#171f26;
  --muted:#5d6f7c;
  --lift:-6px -6px 16px rgba(255,255,255,.95),7px 7px 18px rgba(23,31,38,.13);
  --lift-s:-3px -3px 8px rgba(255,255,255,.9),4px 4px 10px rgba(23,31,38,.11);
  --press:inset -3px -3px 8px rgba(255,255,255,.85),inset 4px 4px 10px rgba(23,31,38,.14);
  --card:28px;
  --r:14px;
}

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

html{
  scroll-behavior:smooth;
  scroll-padding-top:20px;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  padding:0 0 110px;
  color:var(--ink);
  font-family:'Merriweather','Songti SC','Noto Serif SC',Georgia,serif;
  font-size:16.5px;
  line-height:1.75;
  background:
    radial-gradient(1200px 620px at 8% -8%,#fdf2f7 0,transparent 62%),
    radial-gradient(1000px 520px at 96% 2%,#e3f0fb 0,transparent 64%),
    linear-gradient(180deg,#eef5fb 0,#e6eff8 48%,#f3edf3 100%);
  background-attachment:fixed;
  overflow-x:hidden;
}

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

a{color:#2f5f80;text-decoration:underline;text-underline-offset:3px}
a:hover{color:var(--ink)}

:focus-visible{outline:2px solid #7fa9c8;outline-offset:3px;border-radius:8px}

/* ---------- 底部固定条 ---------- */
.bar{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:60;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:linear-gradient(145deg,#edf5fb,#dfe9f3);
  border-radius:22px 22px 0 0;
  box-shadow:0 -7px 20px rgba(23,31,38,.13),inset 0 1px 0 rgba(255,255,255,.9);
}

.mark{
  font-family:'Abril Fatface','Songti SC',serif;
  font-size:1.06rem;
  letter-spacing:.04em;
  color:var(--ink);
  text-decoration:none;
  padding:11px 14px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  border-radius:var(--r);
  background:linear-gradient(145deg,#cfe5f6,#bfd9ee);
  box-shadow:var(--lift-s);
  transition:transform .15s ease,box-shadow .15s ease;
  white-space:nowrap;
}
.mark:hover{color:var(--ink)}

.menu{margin-left:auto;position:relative}

.menu summary{
  list-style:none;
  cursor:pointer;
  padding:12px 16px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  font-size:.95rem;
  border-radius:var(--r);
  background:linear-gradient(145deg,#f7fbfe,#e4eef7);
  box-shadow:var(--lift-s);
  transition:transform .15s ease,box-shadow .15s ease;
  user-select:none;
  white-space:nowrap;
}
.menu summary::-webkit-details-marker{display:none}
.menu summary::after{content:"";width:7px;height:7px;margin-left:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-135deg) translateY(2px)}
.menu[open] summary{box-shadow:var(--press)}
.menu[open] summary::after{transform:rotate(45deg) translateY(-2px)}

.menu menu{
  position:absolute;
  right:0;
  bottom:calc(100% + 12px);
  width:min(76vw,264px);
  margin:0;
  padding:10px;
  list-style:none;
  border-radius:20px;
  background:linear-gradient(145deg,#f6fafd,#e3edf6);
  box-shadow:var(--lift),inset 0 1px 0 rgba(255,255,255,.9);
  display:grid;
  gap:4px;
  max-height:60vh;
  overflow:auto;
}

.menu li{margin:0}
.menu li a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:11px 13px;
  border-radius:12px;
  color:var(--ink);
  text-decoration:none;
  font-size:.95rem;
  transition:background .15s ease,box-shadow .15s ease;
}
.menu li a:hover,.menu li a:focus-visible{background:#fdfeff;box-shadow:var(--lift-s)}
.menu li a:active{box-shadow:var(--press)}

.cta{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:12px 16px;
  border-radius:var(--r);
  font-size:.95rem;
  font-weight:700;
  color:var(--ink);
  text-decoration:none;
  background:linear-gradient(145deg,#fae6ef,#f0d2e0);
  box-shadow:var(--lift-s);
  transition:transform .15s ease,box-shadow .15s ease;
  white-space:nowrap;
}
.cta:active{transform:scale(.98);box-shadow:var(--press)}

/* ---------- 首屏 ---------- */
.hero{
  max-width:1120px;
  margin:0 auto;
  padding:26px 18px 6px;
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
  align-items:center;
}
.hero-txt{order:1}
.hero-art{order:2}
.hero.solo{grid-template-columns:1fr}

.hero h1{
  font-family:'Abril Fatface','Songti SC',serif;
  font-weight:400;
  font-size:clamp(1.9rem,7.6vw,3.1rem);
  line-height:1.16;
  letter-spacing:.01em;
  margin:0 0 12px;
  text-align:right;
  text-wrap:balance;
}

.lede{
  margin:0;
  text-align:right;
  color:var(--muted);
  font-size:.98rem;
  line-height:1.7;
}

.hero-art{
  border-radius:var(--card);
  overflow:hidden;
  background:linear-gradient(145deg,#f6faff,#e1ecf6);
  box-shadow:var(--lift);
  aspect-ratio:4/3;
}
.hero-img{width:100%;height:100%;object-fit:cover}

/* ---------- 版心：侧栏 + 正文 ---------- */
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:16px 18px 34px;
  display:grid;
  gap:18px;
  grid-template-columns:1fr;
}

.side{
  background:linear-gradient(145deg,#f5fafd,#e5eff8);
  border-radius:22px;
  padding:16px;
  box-shadow:var(--lift);
}

.side small{
  display:block;
  font-size:.72rem;
  letter-spacing:.24em;
  color:var(--muted);
  margin-bottom:5px;
}

.side h2{
  font-family:'Merriweather','Songti SC',serif;
  font-weight:700;
  font-size:1.02rem;
  margin:0 0 12px;
  letter-spacing:.04em;
}

.side menu{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.side li{margin:0}
.side a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 12px;
  border-radius:12px;
  font-size:.95rem;
  color:var(--ink);
  text-decoration:none;
  background:linear-gradient(145deg,#f8fbfe,#e9f2f9);
  box-shadow:var(--lift-s);
  transition:box-shadow .15s ease,transform .15s ease;
}
.side a:hover{background:#fdfeff}
.side a:active{box-shadow:var(--press);transform:scale(.99)}

.body{min-width:0}

.prose{
  background:linear-gradient(145deg,#f9fcfe,#eaf2f9);
  border-radius:var(--card);
  padding:22px 18px 26px;
  box-shadow:var(--lift);
  overflow-wrap:break-word;
}

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

.prose section{scroll-margin-top:24px}
.prose section + section{
  margin-top:26px;
  padding-top:24px;
  border-top:1px solid rgba(23,31,38,.1);
}

.prose small{
  display:block;
  font-size:.72rem;
  letter-spacing:.22em;
  color:var(--muted);
  margin-bottom:5px;
}

.prose h2,.prose h3,.prose h4{
  font-family:'Abril Fatface','Songti SC',serif;
  font-weight:400;
  line-height:1.32;
  letter-spacing:.01em;
  margin:22px 0 10px;
}
.prose h2{font-size:1.4rem}
.prose h3{font-size:1.16rem}
.prose h4{font-size:1.02rem;font-family:'Merriweather','Songti SC',serif;font-weight:700}

.prose p{margin:0 0 14px}

.prose ul,.prose ol{margin:0 0 14px;padding-left:1.25em}
.prose li{margin:0 0 7px}

.prose blockquote{
  margin:0 0 16px;
  padding:14px 16px;
  border-radius:18px;
  background:linear-gradient(145deg,#fbebf2,#f4dde8);
  box-shadow:var(--lift-s);
  color:#2c3a44;
}
.prose blockquote p:last-child{margin:0}

.prose img{border-radius:18px;margin:6px 0 16px;box-shadow:var(--lift-s)}

.prose table{
  display:block;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:0 0 16px;
  font-size:.94rem;
}
.prose th,.prose td{
  padding:9px 12px;
  border-bottom:1px solid rgba(23,31,38,.12);
  text-align:left;
}
.prose th{font-weight:700;background:rgba(200,224,244,.4)}

.prose hr{border:0;height:1px;background:rgba(23,31,38,.12);margin:24px 0}

.prose code{
  font-family:ui-monospace,'SFMono-Regular',Menlo,Consolas,monospace;
  font-size:.9em;
  background:rgba(23,31,38,.06);
  padding:2px 6px;
  border-radius:8px;
}

/* ---------- 页脚 ---------- */
.foot{
  max-width:1120px;
  margin:0 auto;
  padding:28px 18px 26px;
  display:grid;
  gap:12px;
  grid-template-columns:1fr;
}

.fmark{
  margin:0;
  font-family:'Abril Fatface','Songti SC',serif;
  font-weight:400;
  font-size:clamp(2.3rem,11vw,4.2rem);
  line-height:1;
  letter-spacing:.03em;
  color:#1c2831;
  text-shadow:-2px -2px 4px rgba(255,255,255,.9),2px 3px 5px rgba(23,31,38,.14);
}

.flinks{margin:0;display:flex;flex-wrap:wrap;gap:2px 16px}
.flinks a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:8px 0;
  color:var(--ink);
  text-decoration:none;
  font-size:.94rem;
}
.flinks a:hover{text-decoration:underline}

.fnote{
  grid-column:1/-1;
  font-size:.82rem;
  color:var(--muted);
  padding-top:12px;
  border-top:1px solid rgba(23,31,38,.12);
}

/* ---------- 滚动揭示 ---------- */
html.rev .rev{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .6s ease,transform .6s ease;
}
html.rev .rev.in{opacity:1;transform:none}

/* ---------- 断点 ---------- */
@media (min-width:760px){
  .hero{
    grid-template-columns:.92fr 1.08fr;
    padding:44px 24px 10px;
    min-height:45vh;
  }
  .hero-txt{order:0}
  .hero-art{order:0}
  .hero.solo{grid-template-columns:1fr}
  .wrap{padding:20px 24px 42px}
  .prose{padding:30px 32px 34px}
  .foot{grid-template-columns:1.25fr 1fr;align-items:start;padding:36px 24px 30px}
  .flinks{justify-content:flex-end}
  .prose h2{font-size:1.62rem}
}

@media (min-width:960px){
  .wrap{grid-template-columns:250px 1fr;align-items:start}
  .side{position:sticky;top:20px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  html.rev .rev{opacity:1;transform:none;transition:none}
  .mark,.cta,.menu summary,.menu li a,.side a{transition:none}
}

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