:root{
  --cream:#f5e6c8;
  --tan:#d4a574;
  --ink:#262117;
  --ink-2:#4c4334;
  --paper:#fdf5e6;
  --line:rgba(38,33,23,.16);
  --r:28px;
}

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

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

body{
  margin:0;
  font-family:Inter,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.72;
  font-weight:400;
  color:var(--ink);
  background-color:var(--cream);
  background-image:radial-gradient(rgba(38,33,23,.14) 1px,transparent 1.5px);
  background-size:20px 20px;
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
}

body::before{
  content:"";
  position:fixed;
  inset:-10px;
  z-index:6;
  pointer-events:none;
  opacity:.16;
  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='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:5;
  pointer-events:none;
  mix-blend-mode:screen;
  opacity:.55;
  animation:leak 15s ease-in-out infinite alternate;
  background:
    radial-gradient(58% 38% at 92% -8%,rgba(255,198,124,.62),transparent 68%),
    radial-gradient(46% 34% at 2% 106%,rgba(212,165,116,.45),transparent 70%);
}

@keyframes leak{
  from{opacity:.32;transform:translate3d(0,0,0) scale(1)}
  to{opacity:.68;transform:translate3d(0,-10px,0) scale(1.04)}
}

::selection{background:var(--tan);color:var(--ink)}

a{color:inherit}

/* 顶部细条 */
.topline{
  position:sticky;
  top:0;
  z-index:70;
  display:flex;
  align-items:center;
  height:28px;
  padding:0 14px;
  overflow:hidden;
  font-size:11px;
  letter-spacing:.28em;
  color:var(--ink-2);
  white-space:nowrap;
  border-bottom:1px solid var(--line);
  background:linear-gradient(90deg,rgba(212,165,116,.85),rgba(245,230,200,.9) 46%,rgba(212,165,116,.7));
}

.topline-run{
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 左侧竖排胶囊导航 */
.rail{
  position:sticky;
  top:28px;
  z-index:80;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  overflow:hidden;
  background:var(--ink);
  border-bottom:2px solid var(--tan);
}

.rail-mark{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  overflow:hidden;
  border-radius:50%;
  background:var(--tan);
  color:var(--ink);
  text-decoration:none;
  box-shadow:0 0 0 2px rgba(245,230,200,.35);
}

.rail-mark img{width:100%;height:100%;object-fit:cover}

.mark-dot{
  display:block;
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--ink);
}

.rail-list{
  display:flex;
  gap:6px;
  margin:0;
  padding:0 0 3px;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:thin;
}

.rail-list a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 15px;
  border-radius:999px;
  color:var(--cream);
  font-size:15px;
  line-height:1.3;
  text-decoration:none;
  white-space:nowrap;
  background:rgba(245,230,200,.13);
  border:1px solid rgba(245,230,200,.22);
  transition:background .22s ease,color .22s ease,transform .22s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible,
.rail-list a[aria-current]{
  background:var(--tan);
  border-color:var(--tan);
  color:var(--ink);
  transform:translateY(-1px);
}

.rail-list a:focus-visible{outline:2px solid var(--cream);outline-offset:2px}

/* 版心 */
.sheet{
  padding:20px 16px 44px;
}

.body{max-width:100%}

/* 首屏 */
.hero{
  display:flex;
  flex-direction:column;
  gap:22px;
  padding:14px 0 30px;
  min-height:calc(100svh - 160px);
  position:relative;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0 -16px;
  z-index:-1;
  border-radius:0 0 var(--r) var(--r);
  background-image:radial-gradient(rgba(38,33,23,.22) 1px,transparent 1.7px);
  background-size:13px 13px;
  opacity:.5;
}

.hero-copy{order:1;text-align:center}

.hero-media{order:2}

.hero-h1{
  margin:0 0 16px;
  font-size:clamp(29px,7.6vw,40px);
  line-height:1.2;
  font-weight:700;
  letter-spacing:-.022em;
  text-shadow:1px 2px 0 rgba(212,165,116,.55);
}

.hero-p{
  margin:0 auto 22px;
  max-width:34ch;
  font-size:16px;
  color:var(--ink-2);
}

.hero-go{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 24px;
  border-radius:999px;
  border:2px solid var(--ink);
  background:var(--tan);
  color:var(--ink);
  font-size:16px;
  font-weight:600;
  text-decoration:none;
  box-shadow:3px 3px 0 rgba(38,33,23,.85);
  transition:transform .2s ease,box-shadow .2s ease;
}

.hero-go:hover{transform:translate(2px,2px);box-shadow:1px 1px 0 rgba(38,33,23,.85)}

/* 拍立得相框 */
.polaroid{
  position:relative;
  display:block;
  margin:0 auto;
  padding:11px 11px 44px;
  max-width:380px;
  background:var(--paper);
  border:1px solid rgba(38,33,23,.22);
  border-radius:8px;
  box-shadow:0 16px 30px -22px rgba(38,33,23,.9);
  transform:rotate(-1.6deg);
  animation:vhs 8s ease-in-out infinite;
}

.polaroid-window{
  display:block;
  aspect-ratio:4/3.4;
  overflow:hidden;
  border-radius:4px;
  background:linear-gradient(150deg,#e8d3ae,#c9a375 62%,#b98f5c);
}

.polaroid-window img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:sepia(.28) contrast(1.06) saturate(.82);
}

.polaroid-tape{
  position:absolute;
  top:-9px;
  left:50%;
  width:76px;
  height:20px;
  margin-left:-38px;
  background:rgba(212,165,116,.55);
  border:1px solid rgba(38,33,23,.12);
  transform:rotate(2.4deg);
}

@keyframes vhs{
  0%,86%,100%{transform:rotate(-1.6deg) skewX(0)}
  88%{transform:rotate(-1.6deg) skewX(-1.6deg) translateX(3px)}
  91%{transform:rotate(-1.4deg) skewX(1.1deg) translateX(-2px)}
}

/* 正文分节（来自 page.content） */
.body article{scroll-margin-top:104px}

.body > article:not(.hero){
  position:relative;
  margin:0 0 20px;
  padding:24px 20px 26px;
  border:1px solid var(--line);
  border-bottom:3px solid var(--tan);
  border-radius:var(--r);
  background:rgba(253,245,230,.82);
  box-shadow:0 14px 26px -24px rgba(38,33,23,.95);
  transition:transform .25s ease,box-shadow .25s ease;
}

.body > article:not(.hero):hover{
  transform:translateY(-2px);
  box-shadow:0 20px 30px -24px rgba(38,33,23,.95);
}

.body h2,
.body h3{
  margin:0 0 12px;
  font-weight:600;
  letter-spacing:-.012em;
  color:var(--ink);
}

.body h2{font-size:clamp(21px,5.4vw,28px);line-height:1.32}
.body h3{font-size:clamp(18px,4.4vw,22px);line-height:1.42}

.body h2 span,
.body h3 span{
  padding:0 .14em;
  background:linear-gradient(transparent 64%,rgba(212,165,116,.62) 64%);
}

.body p{margin:0 0 1em}
.body p:last-child{margin-bottom:0}

.body a{
  color:#8a5b26;
  text-decoration:none;
  border-bottom:2px solid rgba(212,165,116,.72);
}

.body a:hover{color:var(--ink);border-bottom-color:var(--ink)}

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

.body img{
  display:block;
  max-width:100%;
  height:auto;
  margin:0 0 1em;
  border-radius:18px;
  filter:sepia(.22) contrast(1.04) saturate(.86);
}

.body blockquote{
  margin:0 0 1em;
  padding:12px 18px;
  border-left:4px solid var(--tan);
  border-radius:0 16px 16px 0;
  background:rgba(212,165,116,.2);
}

.body blockquote p:last-child{margin-bottom:0}

.body table{
  width:100%;
  margin:0 0 1em;
  border-collapse:collapse;
  font-size:16px;
}

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

.body code{
  padding:1px 5px;
  border-radius:6px;
  font-size:.94em;
  background:rgba(38,33,23,.09);
}

.body hr{
  height:1px;
  margin:22px 0;
  border:0;
  background:repeating-linear-gradient(90deg,var(--line) 0 6px,transparent 6px 12px);
}

/* 右侧目录 */
.side{
  margin-top:8px;
  padding-top:20px;
  border-top:2px solid var(--tan);
}

.side-h{
  margin:0 0 10px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.3em;
  color:var(--ink-2);
}

.side-h span{
  padding:0 .2em;
  background:linear-gradient(transparent 60%,rgba(212,165,116,.6) 60%);
}

.side-list{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}

.side-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:6px 12px;
  border-left:3px solid transparent;
  border-radius:0 14px 14px 0;
  color:var(--ink-2);
  font-size:15px;
  text-decoration:none;
  transition:background .2s ease,border-color .2s ease,color .2s ease;
}

.side-list a:hover,
.side-list a:focus-visible,
.side-list a[aria-current]{
  border-left-color:var(--tan);
  background:rgba(212,165,116,.26);
  color:var(--ink);
}

/* 页脚 */
.foot{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:22px 18px;
  padding:34px 18px 18px;
  color:var(--cream);
  background:var(--ink);
  border-top:3px solid var(--tan);
}

.foot-brand{grid-column:1/-1}

.foot-mark{
  display:inline-grid;
  place-items:center;
  width:46px;
  height:46px;
  overflow:hidden;
  border-radius:50%;
  background:var(--tan);
  box-shadow:0 0 0 2px rgba(245,230,200,.3);
}

.foot-mark img{width:100%;height:100%;object-fit:cover}
.foot-mark .mark-dot{background:var(--ink)}

.foot-name{
  grid-column:1/-1;
  margin:-8px 0 0;
  font-size:15px;
  letter-spacing:.06em;
  color:rgba(245,230,200,.85);
}

.foot-h{
  margin:0 0 8px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.28em;
  color:var(--tan);
}

.foot-h span{
  padding:0 .18em;
  background:linear-gradient(transparent 62%,rgba(212,165,116,.4) 62%);
}

.foot ul{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:0 14px;
}

.foot-nav ul{columns:1}

.foot a{
  display:inline-block;
  padding:10px 0;
  min-height:44px;
  font-size:15px;
  color:rgba(245,230,200,.9);
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color .2s ease,border-color .2s ease;
}

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

.foot-copy{
  grid-column:1/-1;
  margin:6px 0 0;
  padding-top:14px;
  font-size:12px;
  letter-spacing:.12em;
  color:rgba(245,230,200,.6);
  border-top:1px solid rgba(245,230,200,.18);
}

/* 断点 */
@media (min-width:600px){
  .sheet{padding:26px 24px 56px}
  .body > article:not(.hero){padding:30px 28px 32px}
  .foot{grid-template-columns:auto 1fr 1fr;padding:40px 24px 22px}
  .foot-name{grid-column:auto;margin:0}
  .foot-nav ul{columns:2}
}

@media (min-width:900px){
  body{padding-left:112px}

  .topline{position:fixed;left:112px;right:0;top:0;height:34px;z-index:100;padding-left:26px}

  .rail{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    width:112px;
    flex-direction:column;
    align-items:center;
    padding:20px 10px 22px;
    overflow-y:auto;
    border-bottom:0;
    border-right:2px solid var(--tan);
    background-image:linear-gradient(180deg,rgba(245,230,200,.08),transparent 40%);
  }

  .rail-list{
    flex-direction:column;
    width:100%;
    gap:7px;
    padding:22px 0 0;
    overflow:visible;
  }

  .rail-list a{
    justify-content:center;
    min-height:74px;
    min-width:44px;
    padding:14px 8px;
    writing-mode:vertical-rl;
    letter-spacing:.1em;
    font-size:14px;
    line-height:1.4;
    border-radius:999px;
  }

  .sheet{
    display:grid;
    grid-template-columns:minmax(0,1fr) 232px;
    gap:52px;
    max-width:1180px;
    margin:0 auto;
    padding:calc(34px + 34px) 36px 84px;
  }

  .hero{
    display:grid;
    grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
    align-items:center;
    gap:46px;
    min-height:calc(100vh - 34px - 120px);
    padding:20px 0 40px;
  }

  .hero::before{inset:0 -36px;border-radius:var(--r)}

  .hero-copy{order:2;text-align:center}
  .hero-media{order:1}
  .hero-h1{font-size:clamp(34px,3.6vw,50px)}

  .body article{scroll-margin-top:50px}
  .body > article:not(.hero){padding:34px 34px 36px;margin-bottom:26px}

  .side{
    position:sticky;
    top:calc(34px + 26px);
    align-self:start;
    margin-top:14px;
  }

  .foot{
    grid-template-columns:auto minmax(0,1.3fr) minmax(0,1.5fr) auto;
    align-items:start;
    padding:46px 36px 22px;
  }

  .foot-brand,
  .foot-name{grid-column:auto}
  .foot-nav ul{columns:2}
}

@media (min-width:1160px){
  .hero-h1{font-size:52px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body::after,
  .polaroid{animation:none}
  .body > article:not(.hero),
  .hero-go,
  .rail-list a{transition:none}
}

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