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

:root {
  --paper: #ffffff;
  --ash: #f5f5f5;
  --ink: #1f1f1f;
  --line: #e4e4e4;
  --soft: #cfcfcf;
  --muted: #6d6d6d;
  --rail: 300px;
  --e1: 0 1px 2px rgba(31, 31, 31, .07), 0 2px 6px rgba(31, 31, 31, .05);
  --e2: 0 6px 16px rgba(31, 31, 31, .09);
  --e3: 0 14px 34px rgba(31, 31, 31, .14);
  --e4: 0 30px 64px rgba(31, 31, 31, .22);
  --serif: "Noto Serif JP", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "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.8;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .01em;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid #1f1f1f;
  outline-offset: 3px;
}

/* 顶部细条 */
.strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 34px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--e2);
}
.strip p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .34em;
  text-indent: .34em;
  white-space: nowrap;
}

/* 左侧固定栏 */
.rail {
  position: fixed;
  top: 34px; left: 0; bottom: 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px 24px 28px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
  box-shadow: var(--e2);
  overflow-y: auto;
}
.nav-open .rail {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.3;
}
.brand:hover .brand-word { box-shadow: inset 0 -10px 0 var(--ash); }
.brand-mark { width: 32px; height: 32px; box-shadow: var(--e1); }

.nav p {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
  transition: color .2s ease, padding-left .2s ease, background .2s ease;
}
.nav a::before {
  content: "";
  width: 0;
  height: 2px;
  background: var(--ink);
  transition: width .2s ease, margin-right .2s ease;
}
.nav a:hover, .nav a:focus-visible {
  color: var(--ink);
  padding-left: 8px;
  background: var(--ash);
}
.nav a:hover::before { width: 14px; margin-right: 8px; }

.burger {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: .18em;
  cursor: pointer;
  box-shadow: var(--e2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.burger:hover { transform: translateY(-2px); box-shadow: var(--e3); }
.burger-bar { display: block; width: 15px; height: 2px; background: #fff; }
.burger-txt { margin-left: 7px; }

/* 全屏遮罩菜单 */
.nav-open { overflow: hidden; }
.nav-open .nav {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-content: center;
  padding: 80px 48px;
  overflow: auto;
  background: rgba(31, 31, 31, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.nav-open .nav p { gap: 2px; }
.nav-open .nav a {
  min-height: 58px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 30px);
}
.nav-open .nav a::before { background: #fff; }
.nav-open .nav a:hover, .nav-open .nav a:focus-visible {
  color: #fff;
  background: transparent;
  padding-left: 16px;
}
.nav-open .burger {
  position: fixed;
  left: 24px;
  bottom: 28px;
  z-index: 90;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--e3);
}
.nav-open .burger-bar { background: var(--ink); }
.nav-open .burger-bar:nth-child(2) { opacity: 0; }

/* 主视觉 */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 130px 40px 90px;
  background: linear-gradient(160deg, #232323, #4a4a4a 55%, #171717);
  color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  will-change: transform;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(31, 31, 31, .74), rgba(31, 31, 31, .42) 42%, rgba(31, 31, 31, .88));
}
.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 840px;
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}
.hero-badge {
  margin: 0;
  padding: 10px 18px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .26em;
  text-indent: .26em;
  box-shadow: var(--e4);
}
.hero-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 600;
  text-shadow: 0 4px 22px rgba(0, 0, 0, .38);
}
.hero-lead {
  margin: 0;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .87);
}

/* 主区：aside 在左 */
.main {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 44px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}

.side {
  position: sticky;
  top: 58px;
  align-self: start;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-card {
  background: #fff;
  padding: 20px 18px;
  border-bottom: 3px solid var(--ink);
  box-shadow: var(--e1);
  transition: box-shadow .25s ease, transform .25s ease;
}
.side-card:hover { box-shadow: var(--e3); transform: translateY(-3px); }
.side-name { margin: 0; font-size: 19px; }
.side-meta { margin: 8px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.side-title {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: .2em;
  color: var(--muted);
}
.side-title span, .foot-col h3 span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
}
.side-links { margin: 0; display: flex; flex-direction: column; }
.side-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, padding-left .2s ease;
}
.side-links a:hover { color: var(--ink); padding-left: 6px; }

/* 正文 */
.doc { min-width: 0; }
.doc > div {
  position: relative;
  margin-bottom: 30px;
  padding: 34px 38px 30px;
  background: #fff;
  border-bottom: 3px solid var(--ink);
  box-shadow: var(--e1);
  scroll-margin-top: 76px;
  transition: box-shadow .3s ease, transform .3s ease;
}
.doc > div::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 58px; height: 3px;
  background: var(--ink);
}
.doc > div:nth-child(even) { background: var(--ash); }
.doc > div:hover { box-shadow: var(--e3); transform: translateY(-2px); }
.doc > div:last-child { margin-bottom: 0; }

.doc h2 { margin: 0 0 18px; font-size: clamp(22px, 2.6vw, 30px); }
.doc h3 { margin: 26px 0 12px; font-size: 20px; }
.doc h4 { margin: 20px 0 10px; font-size: 18px; }
.doc p { margin: 0 0 18px; overflow-wrap: break-word; }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 1.4em; }
.doc li { margin: 0 0 8px; }
.doc a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--soft);
  text-underline-offset: 3px;
}
.doc a:hover { text-decoration-color: var(--ink); }
.doc blockquote {
  margin: 0 0 18px;
  padding: 16px 20px;
  background: #fff;
  border-left: 3px solid var(--ink);
  box-shadow: var(--e1);
}
.doc blockquote p:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 16px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--ash); }
.doc img { margin: 0 0 18px; box-shadow: var(--e2); }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  background: var(--ash);
  padding: 2px 5px;
}
.doc strong { font-weight: 700; }

/* 页脚 */
.foot {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.5fr .9fr .9fr;
  gap: 40px;
  padding: 72px 40px 0;
  background: var(--ink);
  color: #fff;
}
.foot-cta {
  grid-column: 1 / -1;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.foot-big { margin: 0 0 10px; font-size: clamp(28px, 4.4vw, 52px); color: #fff; }
.foot-lead { margin: 0 0 20px; max-width: 60ch; color: rgba(255, 255, 255, .72); }
.foot-top {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 24px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  box-shadow: var(--e3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.foot-top:hover { transform: translateY(-2px); box-shadow: var(--e4); }
.foot-col h3 {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .7);
}
.foot-col p { margin: 0; display: flex; flex-direction: column; }
.foot-col a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: 15px;
  color: rgba(255, 255, 255, .9);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  transition: color .2s ease, padding-left .2s ease;
}
.foot-col a:hover { color: #fff; padding-left: 8px; }
.foot-base {
  grid-column: 1 / -1;
  padding: 22px 0 28px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.foot-base p { margin: 0; font-size: 14px; letter-spacing: .12em; color: rgba(255, 255, 255, .62); }

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (min-width: 1024px) {
  body { padding-left: var(--rail); }
}

@media (max-width: 1023px) {
  body { padding-top: 94px; }

  .rail {
    top: 30px;
    bottom: auto;
    left: 0; right: 0;
    width: auto;
    height: 62px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    overflow: visible;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--line);
    z-index: 60;
  }
  .brand { border-bottom: 0; padding-bottom: 0; font-size: 18px; min-height: 44px; }
  .burger { margin: 0; min-height: 44px; padding: 0 12px; }
  .burger-txt { font-size: 13px; letter-spacing: .1em; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    align-content: center;
    padding: 100px 22px 40px;
    overflow: auto;
    background: rgba(31, 31, 31, .97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav p { gap: 2px; }
  .nav a {
    min-height: 58px;
    color: #fff;
    font-family: var(--serif);
    font-size: 21px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }
  .nav a::before { background: #fff; }
  .nav-open .burger {
    position: fixed;
    top: 42px; right: 16px; left: auto; bottom: auto;
    background: #fff;
    z-index: 90;
  }

  .hero { min-height: calc(100vh - 94px); padding: 60px 22px 64px; }
  .hero-inner { gap: 16px; }
  .hero-lead { font-size: 16px; }

  .main {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 28px 16px 56px;
  }
  .side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
  .side-jump { grid-column: 1 / -1; }
  .side-jump .side-links { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
  .side-links a { min-height: 42px; border-bottom: 0; font-size: 15px; }

  .doc > div { padding: 24px 20px 22px; margin-bottom: 18px; scroll-margin-top: 110px; }
  .doc > div:hover { transform: none; }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 48px 20px 0;
  }
  .foot-col a { min-height: 44px; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 28px; }
  .doc > div { padding: 20px 16px; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .doc table { font-size: 15px; }
  .doc th, .doc td { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .doc > div, .side-card, .burger, .foot-top { transition: none; }
  .hero-img { transform: none !important; }
}

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