*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: #1565c0; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(960px, calc(100% - 32px)); margin: 0 auto; }
.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

.site-head {
  padding: 16px 0;
  border-bottom: 1px solid #ececec;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #111; font-weight: 700; font-size: 15px; text-decoration: none;
}
.brand:hover { text-decoration: none; color: #333; }
.brand img { width: 38px; border-radius: 9px; }
.menu-btn {
  display: none; border: 1px solid #d0d0d0; background: #fff;
  padding: 7px 12px; border-radius: 8px; font-size: 14px; cursor: pointer;
}
.main-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.main-nav a { color: #555; font-size: 13px; font-weight: 600; text-decoration: none; }
.main-nav a:hover { color: #111; text-decoration: none; }
.drawer {
  display: none; flex-direction: column;
  padding: 12px 0 4px; border-top: 1px solid #f0f0f0; margin-top: 12px;
}
.drawer.open { display: flex; }
.drawer a {
  padding: 10px 0; border-bottom: 1px solid #f5f5f5;
  color: #444; font-size: 14px; text-decoration: none;
}

.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 {
  font-size: clamp(26px, 4.5vw, 38px); line-height: 1.28;
  margin: 0 0 14px; color: #111; font-weight: 800;
}
.hero-lead {
  max-width: 680px; margin: 0 auto; font-size: 17px;
  color: #555; line-height: 1.7;
}
.hero-meta { margin-top: 14px; font-size: 13px; color: #999; }

/* CARD STACK — core layout */
.card-stack-zone {
  padding: 48px 0 72px;
  background: #fff;
}
.card-stack-zone.alt {
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.stack-head { text-align: center; margin-bottom: 36px; }
.stack-head h2 { font-size: 22px; margin: 0 0 8px; color: #111; font-weight: 700; }
.stack-head p { margin: 0; color: #666; font-size: 15px; max-width: 560px; margin-inline: auto; }

.card-stack {
  position: relative;
  width: min(420px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 48px;
}
.stack-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.09);
  overflow: hidden;
  margin-top: -72px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.stack-card:first-child { margin-top: 0; }
.stack-card:hover {
  transform: rotate(0deg) translateY(-6px) !important;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.13);
  z-index: 20 !important;
}
.stack-card:nth-child(1) { transform: rotate(-4deg); z-index: 1; }
.stack-card:nth-child(2) { transform: rotate(3deg) translateX(12px); z-index: 2; }
.stack-card:nth-child(3) { transform: rotate(-2.5deg) translateX(-8px); z-index: 3; }
.stack-card:nth-child(4) { transform: rotate(2deg) translateX(6px); z-index: 4; }
.stack-card:nth-child(5) { transform: rotate(-1.5deg); z-index: 5; }
.stack-card:nth-child(6) { transform: rotate(1.8deg) translateX(-4px); z-index: 6; }

.stack-card img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  border-bottom: 1px solid #f0f0f0;
}
.stack-card img.landscape { aspect-ratio: 16/10; }
.stack-card .card-body { padding: 18px 20px 22px; }
.stack-card .card-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #888; margin-bottom: 8px;
}
.stack-card h3 { margin: 0 0 8px; font-size: 17px; color: #111; line-height: 1.35; }
.stack-card p { margin: 0; font-size: 14px; color: #555; line-height: 1.65; }

.stack-card.text-only { padding: 24px 22px 26px; }
.stack-card.text-only .card-body { padding: 0; }

.stack-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 48px 0;
}
.stack-row.reverse { direction: rtl; }
.stack-row.reverse > * { direction: ltr; }

.content-block { padding: 56px 0; }
.content-block h2 { font-size: 24px; margin: 0 0 16px; color: #111; font-weight: 700; }
.content-block h3 { font-size: 18px; margin: 32px 0 12px; color: #222; }
.content-block p { margin: 0 0 16px; color: #444; font-size: 16px; line-height: 1.8; }
.content-block ul, .content-block ol { margin: 0 0 16px; padding-left: 24px; color: #444; }
.content-block li { margin-bottom: 8px; line-height: 1.7; }

.note {
  margin: 24px 0; padding: 16px 18px;
  background: #f8f9fa; border-left: 3px solid #1565c0;
  font-size: 14px; color: #555; line-height: 1.65;
}
.link-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0;
}
.link-chip {
  display: inline-block; padding: 8px 16px;
  border: 1px solid #e0e0e0; border-radius: 999px;
  font-size: 13px; color: #555; text-decoration: none;
}
.link-chip:hover { background: #f5f5f5; color: #111; text-decoration: none; }

.faq { padding: 48px 0 64px; }
.faq h2 { font-size: 22px; margin: 0 0 20px; text-align: center; }
.faq details { border-bottom: 1px solid #eee; padding: 16px 0; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15px;
  color: #333; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 10px 0 0; font-size: 15px; color: #666; line-height: 1.7; }

.prose-page { padding: 32px 0 64px; }
.prose-page h1 { font-size: 28px; margin: 0 0 24px; line-height: 1.35; }
.prose-page h2 { font-size: 20px; margin: 32px 0 12px; color: #222; }
.prose-page p, .prose-page li { font-size: 16px; color: #444; line-height: 1.8; }
.prose-page ul, .prose-page ol { padding-left: 24px; margin-bottom: 18px; }
.prose-page .fig { margin: 28px 0; text-align: center; }
.prose-page .fig img { margin: 0 auto; border-radius: 10px; border: 1px solid #eee; max-width: 320px; }
.prose-page .fig figcaption { font-size: 13px; color: #888; margin-top: 10px; }
.related-box {
  margin-top: 32px; padding: 18px 20px;
  border: 1px solid #eee; background: #fafafa; border-radius: 10px;
}
.related-box h3 { margin: 0 0 10px; font-size: 13px; color: #888; letter-spacing: 0.06em; }
.related-box a { display: block; padding: 4px 0; font-size: 14px; }

.site-foot {
  padding: 32px 0 40px; border-top: 1px solid #ececec;
  text-align: center; font-size: 13px; color: #999;
}
.site-foot a { color: #666; margin: 0 12px; text-decoration: none; }
.site-foot a:hover { color: #333; text-decoration: none; }
.site-foot p { margin: 14px 0 0; }

.err-page {
  min-height: 55vh; display: grid; place-items: center;
  text-align: center; padding: 48px 20px;
}
.err-page h1 { font-size: 48px; margin: 0 0 12px; color: #ddd; font-weight: 300; }
.err-page p { font-size: 16px; color: #888; }

@media (max-width: 768px) {
  .menu-btn { display: block; margin-left: auto; }
  .main-nav { display: none; }
  .stack-row { grid-template-columns: 1fr; gap: 32px; }
  .stack-row.reverse { direction: ltr; }
  .card-stack { width: min(360px, calc(100% - 24px)); }
  .stack-card { margin-top: -56px; }
  .stack-card:nth-child(even) { transform: rotate(2deg) translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .stack-card { transition: none; }
  .stack-card:hover { transform: none !important; }
}
