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

:root{
  --lime:#87ff71;
  --sun:#ffce5c;
  --ink:#192617;
  --paper:#f7f4e9;
  --soft:#e6e1cd;
  --mute:#42503e;
  --serif:"Noto Serif TC","Songti TC",Georgia,serif;
  --sans:"Noto Sans TC",system-ui,-apple-system,"PingFang TC","Microsoft JhengHei",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.85;
  color:var(--ink);
  background-color:var(--paper);
  background-image:radial-gradient(rgba(25,38,23,.15) 1px,transparent 1.3px);
  background-size:20px 20px;
}

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

a{color:inherit}

/* ---- 顶部两行 ---- */
.mast{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--paper);
  border-bottom:3px solid var(--ink);
  background-image:linear-gradient(180deg,var(--paper) 0,var(--paper) 100%);
}

.mast-brand{
  padding:9px 16px 4px;
  display:flex;
  align-items:center;
  gap:10px;
  border-bottom:2px dotted rgba(25,38,23,.35);
  margin:0 0 6px;
}

.wordmark{
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(21px,5vw,31px);
  letter-spacing:.2em;
  line-height:1.3;
  text-decoration:none;
  color:var(--ink);
  display:inline-block;
  padding:2px 0;
}

.wordmark::after{
  content:"";
  display:block;
  height:5px;
  margin-top:2px;
  background:var(--lime);
  clip-path:polygon(0 0,100% 0,97% 100%,0 100%);
}

.mast-menu{padding:0 14px 11px}

.dropper{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  width:100%;
}

.dropper>summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:8px 18px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:var(--lime);
  font-weight:700;
  font-size:16px;
  line-height:1.3;
  letter-spacing:.08em;
  user-select:none;
}

.dropper>summary::-webkit-details-marker{display:none}
.dropper>summary::marker{content:""}

.dropper>summary::after{
  content:"";
  width:9px;
  height:9px;
  margin-left:9px;
  background:var(--ink);
  clip-path:polygon(50% 100%,0 0,100% 0);
}

.dropper[open]>summary::after{transform:rotate(180deg)}

.pill-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
  flex:1 1 auto;
  min-width:0;
}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:8px 15px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:#fffdf6;
  color:var(--ink);
  text-decoration:none;
  font-size:16px;
  line-height:1.3;
  font-weight:500;
  transition:transform .18s ease,background-color .18s ease,box-shadow .18s ease;
}

.pill:hover,
.pill:focus-visible{
  background:var(--sun);
  transform:translate(-1px,-2px) rotate(-1.4deg);
  box-shadow:3px 3px 0 var(--ink);
}

/* ---- 主栅格 ---- */
main{display:block}

.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:26px 16px 58px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 304px;
  gap:36px;
  align-items:start;
}

.stream{min-width:0}

/* ---- 正文 ---- */
.prose{
  max-width:72ch;
  overflow-wrap:break-word;
}

.prose h1{
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(27px,5.4vw,44px);
  line-height:1.34;
  letter-spacing:.015em;
  margin:0 0 20px;
  padding-left:16px;
  border-left:9px solid var(--sun);
}

.prose>.lede{
  position:relative;
  margin:0 0 6px;
  padding:0 0 16px;
}

.prose>.lede>h1{margin:0}

.prose>.lede::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:min(150px,44%);
  height:6px;
  background:var(--lime);
  clip-path:polygon(0 0,100% 0,95% 100%,0 100%);
}

.prose>.lede+article{padding-top:24px}

.prose h2{
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(22px,3.6vw,29px);
  line-height:1.45;
  margin:30px 0 12px;
  letter-spacing:.02em;
}

.prose h3{
  font-family:var(--sans);
  font-weight:700;
  font-size:19px;
  line-height:1.6;
  margin:24px 0 8px;
  padding-bottom:5px;
  border-bottom:2px dotted rgba(25,38,23,.4);
}

.prose p{margin:0 0 1.05em}
.prose ul,.prose ol{margin:0 0 1.2em;padding-left:1.35em}
.prose li{margin:0 0 .45em}
.prose li::marker{color:#5c7a52;font-weight:700}

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

.prose a:hover{background:var(--sun)}

.prose blockquote{
  margin:22px 0;
  padding:14px 18px;
  border:2px dashed var(--ink);
  border-radius:4px;
  background:#fffdf6;
  font-family:var(--serif);
  font-size:17px;
}

.prose img{border:3px solid var(--ink);border-radius:4px;display:block;margin:20px 0}

.prose table{
  width:100%;
  border-collapse:collapse;
  margin:20px 0;
  font-size:16px;
}

.prose th,.prose td{
  border:2px solid var(--ink);
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
}

.prose th{background:var(--sun)}

.prose hr{
  border:0;
  height:2px;
  background:repeating-linear-gradient(90deg,var(--ink) 0 8px,transparent 8px 16px);
  margin:28px 0;
}

/* ---- 正文分区 ---- */
.prose>article{
  position:relative;
  padding:28px 0 34px;
  border-top:3px dotted rgba(25,38,23,.35);
  scroll-margin-top:132px;
}

.prose>article:first-child{border-top:0;padding-top:2px}

.prose>article::before{
  content:"";
  position:absolute;
  top:26px;
  right:0;
  width:24px;
  height:24px;
  background:var(--sun);
  clip-path:polygon(50% 0,100% 100%,0 100%);
  transform:rotate(-9deg);
}

.prose>article:first-child::before{display:none}

.prose>article:nth-of-type(3n+2)::before{
  background:var(--lime);
  clip-path:polygon(0 0,100% 0,50% 100%);
}

.prose>article:nth-of-type(3n)::before{
  border-radius:50%;
  clip-path:none;
  background:transparent;
  border:4px solid var(--ink);
}

/* ---- 侧栏 ---- */
.side{
  position:sticky;
  top:132px;
  display:grid;
  gap:18px;
  min-width:0;
}

.shot-frame{
  margin:0;
  border:3px solid var(--ink);
  border-radius:4px;
  background:var(--sun);
  overflow:hidden;
  transform:rotate(-1.6deg);
  box-shadow:8px 8px 0 var(--lime);
}

.shot-frame .shot{
  display:block;
  width:100%;
  height:auto;
  border:0;
  margin:0;
}

.shot-frame[data-multi] .shot{display:none}
.shot-frame[data-multi] .shot.is-on{display:block}

.side-block{
  border:2px dashed var(--ink);
  border-radius:4px;
  background:#fffdf6;
  padding:16px 15px 18px;
}

.side-block h2{
  font-family:var(--serif);
  font-size:20px;
  font-weight:700;
  letter-spacing:.14em;
  margin:0 0 4px;
  line-height:1.4;
}

.subtitle{
  margin:0 0 14px;
  font-size:16px;
  line-height:1.6;
  color:var(--mute);
  padding-bottom:10px;
  border-bottom:2px solid var(--lime);
}

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

.toc a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:6px 8px;
  font-size:16px;
  line-height:1.5;
  text-decoration:none;
  color:var(--ink);
  border-bottom:1px dotted rgba(25,38,23,.4);
  transition:background-color .15s ease,padding-left .15s ease;
}

.toc li:last-child a{border-bottom:0}

.toc a:hover,
.toc a:focus-visible{
  background:var(--lime);
  padding-left:14px;
}

/* ---- 页脚 ---- */
.foot{
  border-top:4px solid var(--ink);
  background:var(--ink);
  color:var(--paper);
  background-image:radial-gradient(rgba(135,255,113,.18) 1px,transparent 1.4px);
  background-size:18px 18px;
  padding:34px 16px 24px;
  margin-top:10px;
}

.foot-grid{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.5fr .9fr .7fr;
  gap:26px;
  align-items:start;
}

.superbrand{
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(30px,6.4vw,56px);
  line-height:1.12;
  letter-spacing:.08em;
  margin:0;
  color:var(--lime);
}

.foot address{
  font-style:normal;
  display:grid;
  gap:7px;
  font-size:16px;
  line-height:1.7;
  color:#dfe8d8;
}

.addr-name{
  font-family:var(--serif);
  font-size:18px;
  letter-spacing:.1em;
  color:var(--sun);
}

.addr-host{
  color:#a9b8a2;
  word-break:break-all;
}

.foot-c{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding-top:6px;
}

.geo{display:block}

.geo-a{
  width:40px;
  height:40px;
  background:var(--sun);
  clip-path:polygon(50% 0,100% 100%,0 100%);
  transform:rotate(11deg);
}

.geo-b{
  width:40px;
  height:40px;
  background:var(--lime);
  border-radius:50%;
}

.geo-c{
  width:40px;
  height:40px;
  border:4px solid var(--sun);
  clip-path:polygon(0 0,100% 0,100% 100%);
  transform:rotate(-7deg);
}

.foot-base{
  max-width:1180px;
  margin:28px auto 0;
  padding-top:14px;
  border-top:2px dotted rgba(247,244,233,.35);
  display:flex;
  flex-wrap:wrap;
  gap:10px 20px;
  justify-content:space-between;
  align-items:center;
}

.copy{
  margin:0;
  font-size:16px;
  line-height:1.6;
  color:#cfdac8;
}

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

.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-size:16px;
  line-height:1.4;
  color:var(--sun);
  text-decoration:none;
}

.foot-links a:hover,
.foot-links a:focus-visible{text-decoration:underline;text-underline-offset:3px}

/* ---- 动效 ---- */
.reveal{
  opacity:0;
  transform:translateY(16px);
}

.reveal.in{
  opacity:1;
  transform:none;
  transition:opacity .5s ease,transform .55s cubic-bezier(.2,.8,.3,1);
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .pill,.toc a,.shot-frame{transition:none}
}

/* ---- 断点 ---- */
@media (max-width:860px){
  .wrap{
    grid-template-columns:minmax(0,1fr);
    gap:26px;
    padding:20px 14px 46px;
  }
  .side{position:static}
  .shot-frame{transform:rotate(-1deg);box-shadow:6px 6px 0 var(--lime)}
  .foot-grid{grid-template-columns:minmax(0,1fr);gap:20px}
  .foot-c{padding-top:0}
  .prose>article{scroll-margin-top:118px}
  .prose>article::before{top:30px;right:2px;width:20px;height:20px}
}

@media (max-width:520px){
  .mast-brand{padding:8px 14px 3px}
  .mast-menu{padding:0 12px 10px}
  .pill-row{gap:7px}
  .pill{padding:8px 13px;font-size:15.5px}
  .wrap{padding:16px 13px 42px}
  .prose h1{padding-left:12px;border-left-width:7px}
  .prose>.lede{padding-bottom:12px}
  .superbrand{font-size:clamp(28px,9vw,40px)}
}

@media (min-width:1180px){
  .wrap{padding-left:4px;padding-right:4px}
}

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