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

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --grey: #4a4a4a;
  --glass: rgba(255, 255, 255, 0.62);
  --edge: rgba(26, 26, 26, 0.78);
  --shadow: 5px 7px 0 rgba(26, 26, 26, 0.09);
  --font: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='170' height='170' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--noise),
    radial-gradient(circle at 50% 0, rgba(74, 74, 74, 0.07), transparent 62%);
  background-size: 170px 170px, 100% 640px;
  background-repeat: repeat, no-repeat;
  background-attachment: fixed, scroll;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: 0.002em;
}

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

/* ---------- 顶部两行 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0 clamp(14px, 3vw, 26px) 10px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}

.strip {
  margin: 0 -1px;
  padding: 6px 0 5px;
  border-bottom: 1px dashed rgba(26, 26, 26, 0.4);
  font-size: 12.5px;
  letter-spacing: 0.24em;
  color: var(--grey);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand {
  display: block;
  padding: 8px 0 4px;
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-decoration: none;
  transform: rotate(-0.6deg);
  transform-origin: left center;
}

.brand::after {
  content: "";
  display: block;
  width: 74px;
  height: 5px;
  margin-top: 3px;
  background: var(--ink);
  border-radius: 60% 40% 55% 45% / 60% 55% 45% 40%;
  opacity: 0.85;
}

.menurow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 0;
}

.rule {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(26, 26, 26, 0.5) 0 6px, transparent 6px 11px);
}

.burger,
.ovclose {
  min-height: 42px;
  padding: 9px 20px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transform: rotate(1deg);
}

.burger:active,
.ovclose:active { transform: rotate(0deg) translateY(1px); }

/* ---------- 抽屉/遮罩菜单 ---------- */
.ov {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  width: min(370px, 88vw);
  padding: 18px 22px 46px;
  overflow-y: auto;
  background: var(--paper);
  border-left: 1.5px solid var(--ink);
  box-shadow: -10px 0 0 rgba(26, 26, 26, 0.06);
  transform: translateX(106%);
  visibility: hidden;
  transition: transform 0.34s steps(6, end), visibility 0.34s steps(1, end);
}

html.menu-open .ov {
  transform: none;
  visibility: visible;
}

html.menu-open body { overflow: hidden; }

.ovtop { margin: 0 0 22px; text-align: right; }

.ov h2 {
  margin: 0 0 4px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.ov .subtitle {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--grey);
}

.ov nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ov nav li { border-bottom: 1px dashed rgba(26, 26, 26, 0.35); }

.ov nav a {
  display: block;
  min-height: 48px;
  padding: 13px 2px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.ov nav a::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 8px;
  background: var(--ink);
  border-radius: 60% 40% 45% 55%;
  transform: rotate(12deg);
  opacity: 0.55;
}

.ov nav li:nth-child(2n) a { transform: rotate(-0.5deg); }
.ov nav li:nth-child(2n+1) a { transform: rotate(0.5deg); }

/* ---------- 主体 ---------- */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(16px, 3.4vw, 34px) clamp(13px, 3vw, 24px) 0;
}

.paper { display: block; }
.sheet { display: block; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 45vh;
  padding: clamp(22px, 5vw, 48px) 0 clamp(26px, 5vw, 42px);
  text-align: center;
  background-image: radial-gradient(circle at 1px 1px, rgba(26, 26, 26, 0.15) 1px, transparent 1.6px);
  background-size: 19px 19px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: clamp(24px, 4.6vw, 46px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
  transform: rotate(-0.7deg);
  max-width: 20ch;
}

.lede {
  margin: 0;
  max-width: 32ch;
  font-size: 16px;
  color: var(--grey);
  letter-spacing: 0.01em;
}

.art {
  position: relative;
  width: min(430px, 100%);
  margin: 8px 0 0;
  transform: translateY(var(--py, 0px)) rotate(-1.3deg);
}

.art .hero-ph,
.art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1.5px solid var(--ink);
  border-radius: 16px 13px 17px 12px / 13px 17px 12px 16px;
  filter: grayscale(0.14) contrast(1.05);
}

.tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 108px;
  height: 26px;
  margin-left: -54px;
  background: rgba(26, 26, 26, 0.16);
  border-radius: 2px;
  animation: tapeWob 8.5s ease-in-out infinite alternate;
}

@keyframes tapeWob {
  from { transform: rotate(-5deg) scaleX(1); }
  to { transform: rotate(4deg) scaleX(1.06); }
}

/* ---------- 正文卡片 ---------- */
.sheet > section {
  margin: 0 0 clamp(26px, 5vw, 52px);
  padding: clamp(20px, 3.6vw, 38px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
  backdrop-filter: blur(9px) saturate(1.05);
  border: 1.5px solid var(--edge);
  border-radius: 28px 23px 30px 21px / 23px 30px 21px 28px;
  box-shadow: var(--shadow);
  scroll-margin-top: 138px;
  transform: rotate(-0.24deg);
}

.sheet > section:nth-child(2n) { transform: rotate(0.3deg); }

.sheet > section > h2 {
  display: inline-block;
  margin: 0 0 14px;
  padding-bottom: 6px;
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.032em;
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(-0.5deg);
}

.subtitle,
p.subtitle {
  margin: 0 0 16px;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--grey);
}

.sheet h3 {
  margin: 26px 0 8px;
  font-size: clamp(1.08rem, 2.6vw, 1.24rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.sheet p { margin: 0 0 15px; }
.sheet p:last-child { margin-bottom: 0; }

.sheet ul,
.sheet ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.sheet li { margin: 0 0 8px; }

.sheet a {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(26, 26, 26, 0.45);
}

.sheet strong { font-weight: 700; }

.sheet blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: rgba(26, 26, 26, 0.05);
  border-left: 4px solid var(--ink);
  border-radius: 0 14px 14px 0;
  color: var(--grey);
}

.sheet img {
  display: block;
  height: auto;
  margin: 18px 0;
  border: 1.5px solid var(--ink);
  border-radius: 14px 11px 15px 10px / 11px 15px 10px 14px;
  filter: grayscale(0.1) contrast(1.04);
}

.sheet figure { margin: 20px 0; }
.sheet figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--grey);
  letter-spacing: 0.04em;
}

.sheet hr {
  height: 0;
  margin: 26px 0;
  border: 0;
  border-top: 1.5px dashed rgba(26, 26, 26, 0.4);
}

.sheet table {
  display: block;
  width: 100%;
  margin: 18px 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15.5px;
}

.sheet th,
.sheet td {
  padding: 9px 12px;
  border: 1px solid rgba(26, 26, 26, 0.3);
  text-align: left;
}

.sheet th { background: rgba(26, 26, 26, 0.06); }
.sheet code { font-size: 0.94em; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: clamp(28px, 5vw, 56px);
  padding: clamp(28px, 5vw, 46px) clamp(14px, 3vw, 24px) 24px;
  border-top: 1.5px solid var(--ink);
}

.cta {
  max-width: 900px;
  margin: 0 auto 24px;
}

.cta a {
  display: inline-block;
  font-size: clamp(2rem, 7.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.045em;
  text-decoration: none;
  border-bottom: 3px solid var(--ink);
  transform: rotate(-0.8deg);
}

.frow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.frow small {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--grey);
}

.frow .up {
  display: inline-block;
  padding: 8px 16px;
  min-height: 40px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  transform: rotate(1deg);
}

/* ---------- 断点 ---------- */
@media (min-width: 761px) {
  .top { padding-top: 2px; }
  .strip { padding: 8px 0 6px; }
  .menurow { margin-top: 4px; }
  .hero { min-height: 45vh; }
}

@media (max-width: 760px) {
  .ov {
    width: 100%;
    border-left: 0;
    border-top: 1.5px solid var(--ink);
    transform: translateY(-104%);
  }
  .hero { min-height: 40vh; }
  .sheet > section { scroll-margin-top: 152px; }
}

@media (max-width: 420px) {
  .lede { font-size: 15.5px; }
  .sheet > section { border-radius: 24px 20px 26px 18px / 20px 26px 18px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ov { transition: none; }
  .tape { animation: none; }
  .art { transform: rotate(-1.3deg); }
  .brand,
  .hero h1,
  .cta a,
  .sheet > section { transform: none; }
}

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