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

:root{
  --green:#87ff71;
  --yellow:#ffce5c;
  --ink:#192617;
  --cream:#fbf8ec;
  --glass:rgba(255,255,255,.62);
  --line:3px solid var(--ink);
  --r:10px;
  --serif:"EB Garamond",Georgia,"Songti SC","Noto Serif SC",serif;
  --sans:Lato,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
}

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

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

body{
  margin:0;
  font-family:var(--sans);
  font-size:17px;
  line-height:1.72;
  color:var(--ink);
  background-color:var(--cream);
  background-image:radial-gradient(rgba(25,38,23,.16) 1.4px,transparent 1.4px);
  background-size:16px 16px;
  overflow-x:hidden;
}

a{color:var(--ink)}
img{max-width:100%}

/* 顶部导航 */
.topbar{
  background:var(--green);
  border-bottom:var(--line);
  padding:10px 14px;
  position:relative;
  z-index:20;
}

.topnav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:space-between;
  max-width:1180px;
  margin:0 auto;
}

.nav-side{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  list-style:none;
  margin:0;
  padding:0;
  flex:1 1 0;
  min-width:0;
}

.nav-right{justify-content:flex-end}

.nav-side a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:4px 9px;
  font-size:.94rem;
  letter-spacing:.01em;
  color:var(--ink);
  text-decoration:none;
  border:2px solid transparent;
  border-radius:8px;
  transition:transform .18s ease,background .18s ease,border-color .18s ease;
}

.nav-side a:hover,
.nav-side a:focus-visible{
  background:var(--yellow);
  border-color:var(--ink);
  transform:rotate(-1.5deg) translateY(-2px);
}

.brand{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--serif);
  font-size:1.4rem;
  font-weight:700;
  line-height:1.1;
  color:var(--ink);
  text-decoration:none;
  background:var(--yellow);
  border:var(--line);
  border-radius:var(--r);
  padding:6px 14px;
  transform:rotate(-2deg);
  box-shadow:4px 4px 0 var(--ink);
}

.brand:hover{transform:rotate(1deg) translateY(-2px)}
.brand-logo{display:block;height:32px;width:auto;border-radius:4px}

/* 粘性栏目条 */
.subbar{
  position:sticky;
  top:0;
  z-index:18;
  background:var(--ink);
  border-bottom:var(--line);
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
.subbar::-webkit-scrollbar{display:none}

.subbar-list{
  display:flex;
  gap:6px;
  margin:0 auto;
  padding:6px 12px;
  max-width:1180px;
  list-style:none;
  width:max-content;
}

.subbar-list a{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  min-height:40px;
  padding:2px 12px;
  font-size:.9rem;
  color:var(--green);
  text-decoration:none;
  border:2px dashed rgba(135,255,113,.45);
  border-radius:8px;
  transition:background .18s ease,color .18s ease;
}

.subbar-list a:hover,
.subbar-list a.is-on{
  background:var(--green);
  color:var(--ink);
  border-style:solid;
  border-color:var(--ink);
}

/* 主体网格 */
.stage{
  display:grid;
  grid-template-columns:minmax(0,1fr) 296px;
  gap:26px;
  align-items:start;
  max-width:1180px;
  margin:0 auto;
  padding:26px 16px 64px;
}

/* Hero */
.hero{
  grid-column:1/-1;
  position:relative;
  min-height:100vh;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:var(--line);
  border-radius:14px;
  background:linear-gradient(155deg,#eaffdf 0%,var(--cream) 52%,#fff4d2 100%);
  box-shadow:9px 9px 0 var(--ink);
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:radial-gradient(rgba(25,38,23,.24) 1.6px,transparent 1.6px);
  background-size:22px 22px;
  opacity:.75;
}

.hero::after{
  content:"";
  position:absolute;
  left:-8%;
  bottom:-22%;
  width:60%;
  height:56%;
  background:var(--green);
  opacity:.5;
  clip-path:polygon(0 100%,18% 0,42% 74%,66% 8%,100% 100%);
  mix-blend-mode:multiply;
}

.deco{position:absolute;inset:0;pointer-events:none;z-index:1;overflow:hidden}
.s{position:absolute;display:block}

.s-tri{
  width:96px;height:96px;top:8%;right:16%;
  background:var(--green);
  clip-path:polygon(50% 0,100% 100%,0 100%);
  transform:rotate(-12deg);
  animation:float 9s ease-in-out infinite;
}

.s-dot{
  width:132px;height:132px;left:4%;bottom:10%;
  background:var(--yellow);
  border-radius:50%;
  opacity:.9;
  mix-blend-mode:multiply;
}

.s-ring{
  width:86px;height:86px;top:17%;left:8%;
  border:7px dashed rgba(25,38,23,.55);
  border-radius:50%;
  animation:spin 28s linear infinite;
}

.s-zig{
  width:152px;height:38px;right:6%;bottom:7%;
  background:var(--ink);
  clip-path:polygon(0 100%,10% 0,20% 100%,30% 0,40% 100%,50% 0,60% 100%,70% 0,80% 100%,90% 0,100% 100%);
  transform:rotate(-7deg);
}

.s-cross{
  width:52px;height:52px;top:52%;right:9%;
  background:var(--ink);
  clip-path:polygon(35% 0,65% 0,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%,0 35%,35% 35%);
  opacity:.8;
}

@keyframes float{
  0%,100%{transform:rotate(-12deg) translateY(0)}
  50%{transform:rotate(-6deg) translateY(-14px)}
}

@keyframes spin{to{transform:rotate(360deg)}}

.hero-collage{position:absolute;inset:0;pointer-events:none;z-index:2}

.hero-img{
  position:absolute;
  width:min(28%,214px);
  height:auto;
  border:var(--line);
  border-radius:12px;
  box-shadow:8px 8px 0 var(--ink);
  object-fit:cover;
  background:#fff;
}

.h-img-1{left:3%;top:15%;transform:rotate(-7deg)}
.h-img-2{right:4%;bottom:13%;transform:rotate(6deg)}

.hero-copy{
  position:relative;
  z-index:3;
  max-width:760px;
  padding:44px 22px 52px;
  text-align:center;
}

.hero-title{
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(2.1rem,7vw,4.4rem);
  line-height:1.14;
  letter-spacing:.005em;
  margin:0 0 18px;
  text-shadow:3px 3px 0 var(--yellow),7px 7px 0 rgba(25,38,23,.18);
}

.hero-desc{
  display:inline-block;
  margin:0;
  max-width:32em;
  font-size:1rem;
  line-height:1.7;
  background:rgba(255,255,255,.78);
  border-left:6px solid var(--green);
  border-radius:8px;
  padding:9px 15px;
}

/* 正文 */
.sheet{grid-column:1;min-width:0}
.sheet-body{min-width:0}

.sheet-body > article{
  --rot:0deg;
  background:var(--glass);
  backdrop-filter:blur(7px) saturate(1.15);
  -webkit-backdrop-filter:blur(7px) saturate(1.15);
  border:var(--line);
  border-radius:var(--r);
  box-shadow:6px 6px 0 var(--ink);
  padding:22px 20px;
  margin:0 0 26px;
  scroll-margin-top:88px;
  transform:rotate(var(--rot));
}

.sheet-body > article:nth-child(odd){--rot:-.35deg}
.sheet-body > article:nth-child(4n){--rot:.3deg}

.sheet-body > article::before{
  content:"";
  display:block;
  width:62px;
  height:9px;
  margin-bottom:14px;
  background:repeating-linear-gradient(90deg,var(--yellow) 0 10px,var(--ink) 10px 14px,var(--green) 14px 24px);
  border-radius:5px;
}

.sheet-body h2,
.sheet-body h3{
  font-family:var(--serif);
  font-weight:700;
  line-height:1.25;
  margin:.3em 0 .55em;
}

.sheet-body h2{font-size:clamp(1.4rem,3.6vw,1.92rem)}
.sheet-body h3{font-size:clamp(1.16rem,2.8vw,1.4rem)}

.sheet-body h2 > span,
.sheet-body h3 > span{
  background:linear-gradient(transparent 60%,var(--yellow) 60%);
  padding:0 3px;
}

.sheet-body p{margin:.75em 0}
.sheet-body ul,.sheet-body ol{margin:.7em 0;padding-left:1.3em}
.sheet-body li{margin:.3em 0}

.sheet-body a{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  text-decoration-color:var(--green);
}
.sheet-body a:hover{background:var(--yellow)}

.sheet-body img{
  height:auto;
  border:var(--line);
  border-radius:8px;
}

.sheet-body blockquote{
  margin:1em 0;
  padding:10px 16px;
  border-left:6px solid var(--green);
  background:rgba(135,255,113,.2);
  border-radius:0 8px 8px 0;
}

.sheet-body table{
  width:100%;
  border-collapse:collapse;
  font-size:.96rem;
  margin:1em 0;
}
.sheet-body th,.sheet-body td{
  border:2px solid var(--ink);
  padding:8px 10px;
  text-align:left;
}
.sheet-body th{background:var(--green)}

.sheet-body figcaption,
.sheet-body small{font-size:.86rem;line-height:1.6}

.sheet-kids{
  background:rgba(255,206,92,.25);
  border:var(--line);
  border-radius:var(--r);
  padding:16px;
}

.kids-list{margin:0;padding-left:1.2em}

/* 右侧栏 */
.rail{grid-column:2;min-width:0}

.rail-card{
  position:sticky;
  top:74px;
  background:rgba(255,255,255,.7);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  border:var(--line);
  border-radius:var(--r);
  box-shadow:6px 6px 0 var(--green);
  padding:16px;
  transform:rotate(.7deg);
}

.rail-title{
  font-family:var(--serif);
  font-size:1.12rem;
  margin:0 0 12px;
  line-height:1.2;
}

.rail-title > span{
  display:inline-block;
  background:var(--green);
  border:2px solid var(--ink);
  border-radius:6px;
  padding:2px 9px;
}

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

.rail-list a{
  display:block;
  min-height:40px;
  padding:9px 10px;
  font-size:.95rem;
  line-height:1.35;
  color:var(--ink);
  text-decoration:none;
  border:2px dotted rgba(25,38,23,.42);
  border-radius:8px;
  transition:transform .16s ease,background .16s ease,border-color .16s ease;
}

.rail-list a:hover{
  background:var(--yellow);
  border-color:var(--ink);
  border-style:solid;
  transform:translateX(4px);
}

/* 回到顶部 */
.to-top{
  position:fixed;
  right:14px;
  bottom:16px;
  z-index:40;
  padding:11px 14px;
  font-size:.9rem;
  color:var(--ink);
  text-decoration:none;
  background:var(--yellow);
  border:var(--line);
  border-radius:var(--r);
  box-shadow:4px 4px 0 var(--ink);
  opacity:0;
  transform:translateY(14px);
  pointer-events:none;
  transition:opacity .2s ease,transform .2s ease;
}

.to-top.on{opacity:1;transform:none;pointer-events:auto}
.to-top:hover{background:var(--green)}

/* 页脚 */
.foot{
  background:var(--ink);
  color:#e9ffe3;
  border-top:8px solid var(--green);
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  gap:22px 44px;
  padding:46px clamp(16px,7vw,110px) 0;
}

.foot-mark{
  font-family:var(--serif);
  font-size:clamp(2.4rem,9vw,4.9rem);
  line-height:1;
  margin:0 0 14px;
  color:var(--green);
  letter-spacing:.02em;
  text-shadow:4px 4px 0 rgba(255,206,92,.34);
}

.foot-mark > span{display:inline-block;transform:rotate(-1.5deg)}
.foot-desc{margin:0;max-width:34em;color:#c8e7c0;font-size:.97rem}

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

.foot-list a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:4px 0;
  color:var(--yellow);
  font-size:.96rem;
  text-decoration:none;
  border-bottom:2px dotted transparent;
}

.foot-list a:hover{border-bottom-color:var(--green);color:var(--green)}

.foot-bottom{
  grid-column:1/-1;
  margin-top:10px;
  padding:16px 0 26px;
  text-align:center;
  border-top:2px dashed rgba(233,255,227,.35);
  font-size:.88rem;
  color:#a9c7a2;
}

.foot-copy{margin:0;letter-spacing:.04em}

/* 滚动进场 */
.js-anim .sheet-body > article{
  opacity:0;
  transform:rotate(var(--rot)) translateY(18px);
}

.js-anim .sheet-body > article.in{
  opacity:1;
  transform:rotate(var(--rot));
  transition:opacity .55s ease,transform .55s cubic-bezier(.2,.75,.3,1);
}

@media (max-width:900px){
  .stage{grid-template-columns:minmax(0,1fr)}
  .rail{grid-column:1}
  .rail-card{position:static;transform:none;margin-bottom:8px}
  .rail-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:720px){
  .topnav{flex-direction:column;align-items:stretch;gap:6px}
  .brand{align-self:center;order:-1;margin-bottom:8px}
  .nav-side{flex:0 0 auto;width:100%;justify-content:center}
  .nav-side a{min-height:44px;padding:4px 8px;font-size:.92rem}

  .hero{
    min-height:0;
    padding:40px 0 34px;
    box-shadow:6px 6px 0 var(--ink);
  }
  .hero::after{width:86%;height:44%;opacity:.4}
  .hero-copy{padding:8px 18px 0}
  .hero-collage{position:static;display:flex;justify-content:center;gap:12px;margin-top:26px}
  .hero-img{position:static;width:42%;max-width:172px;box-shadow:5px 5px 0 var(--ink)}
  .h-img-1{transform:rotate(-3deg)}
  .h-img-2{transform:rotate(3deg)}
  .s-cross,.s-ring{display:none}

  .stage{padding:20px 12px 44px;gap:18px}
  .sheet-body > article{padding:18px 15px}

  .foot{grid-template-columns:minmax(0,1fr);padding-top:34px}
  .foot-list{gap:2px 16px}

  .to-top{right:10px;bottom:12px}
}

@media (max-width:420px){
  body{font-size:16px}
  .rail-list{grid-template-columns:minmax(0,1fr)}
  .s-tri{width:64px;height:64px;right:8%}
  .s-dot{width:86px;height:86px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .s-tri,.s-ring{animation:none}
  .js-anim .sheet-body > article{opacity:1;transform:rotate(var(--rot))}
  .to-top{transition:none}
  .nav-side a:hover,.rail-list a:hover{transform:none}
}

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