@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 {
  --ink: #0E0E12;
  --ink-2: #15151b;
  --paper: #F2EFE9;
  --red: #E4572E;
  --line: rgba(242, 239, 233, .14);
  --soft: rgba(242, 239, 233, .62);
  --rail: 88px;
  --serif: "Noto Serif JP", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans JP", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-left: var(--rail);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: .01em;
  overflow-x: hidden;
}

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

a { color: var(--red); }

/* 左侧竖排导航 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 16px 0 20px;
  background: rgba(14, 14, 18, .93);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
  z-index: 30;
}

.mark {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-family: var(--serif);
  font-size: 22px;
  text-decoration: none;
  transition: background .3s, color .3s;
}

.mark:hover { background: var(--red); color: var(--ink); }
.mark img { width: 32px; height: 32px; border-radius: 50%; }

.menu-btn { display: none; }

.rail-nav { flex: 1 1 auto; }

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav > ul > li { position: relative; }

.rail-nav > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: .22em;
  font-size: 16px;
  line-height: 1.4;
  color: var(--paper);
  text-decoration: none;
  padding: 18px 10px;
  min-height: 44px;
  border-radius: 10px;
  transition: color .25s, background .25s;
}

.rail-nav > ul > li > a:hover,
.rail-nav > ul > li:focus-within > a {
  color: var(--red);
  background: rgba(242, 239, 233, .05);
}

.sub {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  min-width: 168px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .55);
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}

.grp:hover > .sub,
.grp:focus-within > .sub {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.sub a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  font-size: 16px;
  color: var(--paper);
  text-decoration: none;
  border-radius: 8px;
  writing-mode: horizontal-tb;
  transition: color .2s, background .2s;
}

.sub a:hover { color: var(--red); background: rgba(228, 87, 46, .13); }

/* 首屏 */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 96px 28px 80px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero-stage { margin: 0; max-width: 100%; }

.kinetic {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(46px, 11vw, 132px);
  line-height: 1.02;
  letter-spacing: .02em;
  background: linear-gradient(172deg, var(--paper) 28%, var(--red) 94%);
  background-size: 100% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen 11s ease-in-out infinite;
}

.kinetic span {
  display: inline-block;
  animation: rise .95s cubic-bezier(.2, .85, .2, 1) both;
  animation-delay: calc(var(--i) * 85ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(.5em) rotate(5deg); filter: blur(9px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes sheen {
  0%, 100% { background-position: 50% 0; }
  50% { background-position: 50% 100%; }
}

.eyebrow {
  display: block;
  font-size: 16px;
  letter-spacing: .36em;
  color: var(--red);
  margin: 0;
}

.hero-sub {
  margin: 0;
  max-width: 30em;
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 400;
  line-height: 1.85;
  color: var(--soft);
}

.hero-tag {
  position: absolute;
  right: 38px;
  bottom: 46px;
  padding: 8px 18px;
  font-size: 16px;
  letter-spacing: .18em;
  color: var(--red);
  border: 1px solid rgba(228, 87, 46, .6);
  border-radius: 999px;
  background: rgba(228, 87, 46, .08);
  transform: rotate(-3deg);
}

/* 正文区 */
main { display: block; }

main > div[id] {
  max-width: 860px;
  margin: 0 auto;
  padding: 88px 28px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

main > div[id]:last-of-type { border-bottom: 0; }

main > div[id] small {
  display: block;
  font-size: 16px;
  letter-spacing: .3em;
  color: var(--red);
  margin-bottom: 8px;
}

main > div[id] h2 {
  margin: .1em 0 .7em;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: .01em;
}

main > div[id] small + h2 { margin-top: 0; }

main > div[id] h3 {
  margin: 1.6em 0 .5em;
  font-family: var(--serif);
  font-size: clamp(19px, 2.6vw, 23px);
  font-weight: 600;
  line-height: 1.5;
}

main > div[id] p {
  margin: 0 0 1.1em;
  color: rgba(242, 239, 233, .88);
}

main > div[id] ul,
main > div[id] ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

main > div[id] li { margin: .45em 0; }

main > div[id] a {
  color: var(--red);
  text-underline-offset: 3px;
}

main > div[id] strong { color: var(--paper); }

main > div[id] figure {
  margin: 1.5em 0;
  padding: 0;
}

main > div[id] figure img {
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .45);
}

main > div[id] figcaption {
  margin-top: 10px;
  font-size: 16px;
  color: var(--soft);
}

main > div[id] aside {
  margin: 1.5em 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(242, 239, 233, .04);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
}

main > div[id] blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--red);
  color: var(--soft);
  font-family: var(--serif);
}

main > div[id] table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 16px;
}

main > div[id] th,
main > div[id] td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

main > div[id] img { border-radius: 10px; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}

.reveal.in { opacity: 1; transform: none; }

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--soft);
}

.foot-mark {
  font-family: var(--serif);
  color: var(--paper);
  letter-spacing: .12em;
}

.foot-nav { display: flex; flex-wrap: wrap; gap: 2px; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--soft);
  text-decoration: none;
  border-radius: 8px;
  transition: color .2s, background .2s;
}

.foot-nav a:hover { color: var(--red); background: rgba(242, 239, 233, .05); }

.foot-copy { letter-spacing: .06em; }

@media (max-width: 820px) {
  body { padding-left: 0; padding-top: 64px; }

  .rail {
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mark { width: 40px; height: 40px; font-size: 20px; }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-left: auto;
    padding: 10px 18px;
    font-family: var(--sans);
    font-size: 16px;
    color: var(--paper);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
  }

  .rail-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 10px 14px 16px;
    background: #101016;
    border-bottom: 1px solid var(--line);
  }

  .rail[data-open="true"] .rail-nav { display: block; }

  .rail-nav > ul > li > a {
    writing-mode: horizontal-tb;
    justify-content: flex-start;
    padding: 13px 10px;
    font-size: 17px;
    letter-spacing: .1em;
  }

  .sub {
    position: static;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0 0 8px 16px;
    list-style: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .sub a { padding: 11px 10px; min-height: 44px; }

  .hero {
    min-height: auto;
    padding: 76px 20px 64px;
    gap: 18px;
  }

  .hero-tag {
    position: static;
    align-self: center;
    transform: none;
  }

  main > div[id] {
    padding: 64px 20px;
    scroll-margin-top: 78px;
  }

  .foot { padding: 20px; justify-content: flex-start; }
  .foot-copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kinetic { animation: none; }
  .kinetic span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

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