@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 {
  --c-bg: #1A1A2E;
  --c-accent: #E94560;
  --c-ink: #0F3460;
  --c-surface: #16213E;
  --c-surface2: #0F3460;
  --c-text: #E8E8F0;
  --c-text-muted: #9090A8;
  --c-border: #2A2A4A;
  --c-accent-dim: rgba(233,69,96,0.12);
  --nav-w: 220px;
  --radius: 0px;
  --transition: 160ms ease;
  --font-sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
}

/* ── 重置 ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
}
a { color: var(--c-accent); text-decoration: none; transition: color var(--transition), background var(--transition), opacity var(--transition); }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { font-family: var(--font-serif); line-height: 1.3; }
h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 700; }
h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin-bottom: 1em; }
ul,ol { padding-left: 1.4em; margin-bottom: 1em; }

/* ── 布局骨架 ── */
.site-wrap {
  display: flex;
  min-height: 100vh;
}

/* ── 侧边导航 ── */
.side-nav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-surface);
  border-right: 2px solid var(--c-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.nav-brand {
  padding: 20px 16px 16px;
  border-bottom: 2px solid var(--c-border);
}
.nav-brand a {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.side-nav ol {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}
.side-nav ol li { padding: 0; }
.side-nav ol li a {
  display: block;
  padding: 11px 20px;
  color: var(--c-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  border-left: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.side-nav ol li a:hover,
.side-nav ol li a[aria-current="page"] {
  color: var(--c-accent);
  border-left-color: var(--c-accent);
  background: var(--c-accent-dim);
}

/* ── 页面主体 ── */
.page-body {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-body main { flex: 1; }

/* ── 通用 section ── */
.content-section {
  display: flex;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px;
  width: 100%;
}

/* aside 在内容左侧 */
.content-section > aside,
.faq-banner-section > aside,
.about-header-section > aside,
.privacy-header-section > aside,
.guide-header-section > aside,
.feature-intro-section > aside {
  width: 200px;
  flex-shrink: 0;
  padding-right: 24px;
}
.content-section > figure,
.content-section > .content-figure {
  flex: 1;
  min-width: 0;
}

/* ── aside 样式 ── */
.aside-label, .section-eyebrow, .page-eyebrow, .hero-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.rel-link {
  display: block;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--c-surface);
  border-left: 2px solid var(--c-border);
  color: var(--c-text);
  font-size: 0.8rem;
  line-height: 1.4;
  transition: border-color var(--transition), background var(--transition);
}
.rel-link strong {
  font-weight: 500;
  display: block;
}
.rel-link:hover {
  border-left-color: var(--c-accent);
  background: var(--c-accent-dim);
  color: var(--c-accent);
}

/* ── 日期 ── */
.dates { margin-bottom: 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.pub-date, .mod-date {
  font-size: 0.78rem;
  color: var(--c-text-muted);
}

/* ── 正文容器 ── */
.content-figure { min-width: 0; }
.prose {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
}
.prose h2, .prose h3 { margin: 1.6em 0 0.6em; color: #fff; }
.prose h2 { border-left: 4px solid var(--c-accent); padding-left: 12px; }
.prose a { color: var(--c-accent); border-bottom: 1px solid var(--c-accent-dim); }
.prose a:hover { border-bottom-color: var(--c-accent); }
.prose ul, .prose ol { margin: 0.8em 0 1em 1.4em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 12px 20px;
  background: var(--c-surface);
  margin: 1.2em 0;
  color: var(--c-text-muted);
}
.prose strong { color: #fff; font-weight: 700; }
.prose code {
  background: var(--c-surface);
  padding: 2px 6px;
  font-size: 0.88em;
  border: 1px solid var(--c-border);
}
.prose pre {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 16px;
  overflow-x: auto;
  margin: 1em 0;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.prose th, .prose td {
  border: 1px solid var(--c-border);
  padding: 8px 12px;
  font-size: 0.9rem;
}
.prose th { background: var(--c-surface); font-weight: 700; }

/* ── 页脚 ── */
footer {
  background: var(--c-surface);
  border-top: 2px solid var(--c-border);
  padding: 24px 32px;
  text-align: center;
}
footer p {
  margin-bottom: 8px;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
footer p a {
  color: var(--c-text-muted);
  font-size: 0.88rem;
  padding: 4px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
footer p a:hover { color: var(--c-accent); }
footer small {
  display: block;
  color: var(--c-text-muted);
  font-size: 0.76rem;
}
.footer-brand { color: var(--c-accent) !important; font-weight: 700; }

/* ════════════════════════════════
   首页
   ════════════════════════════════ */
.page-body-home main { display: flex; flex-direction: column; }

/* Hero */
.hero-section {
  display: flex;
  align-items: stretch;
  min-height: 45vh;
  background: var(--c-surface);
  border-bottom: 2px solid var(--c-border);
  overflow: hidden;
}
.hero-collage {
  position: relative;
  width: 42%;
  background: var(--c-bg);
  overflow: hidden;
  flex-shrink: 0;
}
.hero-bg-text {
  position: absolute;
  bottom: -10px; left: -10px;
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 700;
  color: rgba(233,69,96,0.08);
  line-height: 1;
  pointer-events: none;
  font-family: var(--font-serif);
  white-space: nowrap;
  z-index: 0;
}
.hero-img {
  position: absolute;
  object-fit: cover;
  border: 3px solid var(--c-border);
}
.hero-img-a {
  width: 65%; height: 65%;
  top: 8%; left: 8%;
  z-index: 2;
}
.hero-img-b {
  width: 55%; height: 55%;
  bottom: 6%; right: 4%;
  z-index: 3;
}
.hero-text {
  flex: 1;
  padding: 40px 40px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.hero-sub {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  max-width: 460px;
  margin: 0;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  min-height: 48px;
  align-self: flex-start;
  border: none;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
}
.btn-primary:hover { background: #c73652; color: #fff; }

/* 首页内文 + aside */
.content-prose {
  border-bottom: 1px solid var(--c-border);
}
.home-aside {
  display: flex;
  flex-direction: column;
}

/* 卡片区 */
.cards-section {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px;
  gap: 40px;
  width: 100%;
}
.cards-wrap {
  flex: 2;
  min-width: 0;
}
.cards-aside {
  width: 280px;
  flex-shrink: 0;
}
.cards-wrap > small, .cards-aside > small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.cards-wrap > h2, .cards-aside > h2 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.card-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  transition: border-color var(--transition), background var(--transition);
}
.card-block strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.4;
}
.card-block span {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  display: block;
  line-height: 1.5;
}
.card-block:hover {
  border-color: var(--c-accent);
  background: var(--c-accent-dim);
}
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.card-feature {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

/* ════════════════════════════════
   指南页
   ════════════════════════════════ */
.guide-header-section,
.faq-banner-section,
.about-header-section,
.privacy-header-section,
.feature-intro-section {
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid var(--c-border);
  overflow: hidden;
}
.guide-banner,
.faq-banner,
.about-banner,
.privacy-banner {
  flex: 1;
  position: relative;
  background: var(--c-surface);
  padding: 40px 40px 40px 40px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.guide-num-bg,
.faq-num-bg,
.about-bg-text,
.privacy-bg-text {
  position: absolute;
  top: -20px; right: -10px;
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 900;
  color: rgba(233,69,96,0.07);
  line-height: 1;
  font-family: var(--font-serif);
  pointer-events: none;
  white-space: nowrap;
}
.guide-meta,
.faq-banner-inner,
.about-banner-inner,
.privacy-banner-inner {
  position: relative;
  z-index: 1;
}
.guide-meta h1,
.faq-banner-inner h1,
.about-banner-inner h1,
.privacy-banner-inner h1 { margin: 8px 0 12px; }

.guide-nav-aside,
.faq-quick-aside,
.about-quick-aside,
.privacy-aside {
  width: 200px;
  flex-shrink: 0;
  padding: 32px 24px;
  background: var(--c-bg);
  border-left: 2px solid var(--c-border);
  display: flex;
  flex-direction: column;
}

/* 指南 content section */
.toc-aside,
.faq-feature-aside,
.about-nav-aside,
.privacy-nav-aside,
.feature-aside-nav {
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════
   功能页
   ════════════════════════════════ */
.feature-hero-fig {
  flex: 1;
  position: relative;
  background: var(--c-surface);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: 200px;
}
.feature-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.feature-hero-text {
  position: relative;
  z-index: 1;
  padding: 36px 40px;
}
.feature-hero-text h1 { margin: 8px 0 12px; }
.feature-aside-top {
  width: 200px;
  flex-shrink: 0;
  padding: 32px 24px;
  background: var(--c-bg);
  border-left: 2px solid var(--c-border);
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════
   FAQ 页
   ════════════════════════════════ */
.faq-content .prose h2 { margin-top: 2em; }

/* ════════════════════════════════
   动效
   ════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ════════════════════════════════
   响应式 — 中等屏
   ════════════════════════════════ */
@media (max-width: 900px) {
  :root { --nav-w: 180px; }
  .hero-collage { width: 36%; }
  .hero-text { padding: 28px 24px; }
  .cards-section { flex-direction: column; gap: 24px; }
  .cards-aside { width: 100%; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .guide-header-section,
  .faq-banner-section,
  .about-header-section,
  .privacy-header-section,
  .feature-intro-section { flex-direction: column; }
  .guide-nav-aside,
  .faq-quick-aside,
  .about-quick-aside,
  .privacy-aside,
  .feature-aside-top {
    width: 100%;
    border-left: none;
    border-top: 2px solid var(--c-border);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 24px;
  }
  .guide-nav-aside .aside-label,
  .faq-quick-aside .aside-label,
  .about-quick-aside .aside-label,
  .privacy-aside .aside-label,
  .feature-aside-top .aside-label { width: 100%; margin-bottom: 4px; }
}

/* ════════════════════════════════
   响应式 — 手机
   ════════════════════════════════ */
@media (max-width: 640px) {
  :root { --nav-w: 0px; }

  .side-nav {
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%;
    height: auto;
    max-height: 50vh;
    border-right: none;
    border-top: 2px solid var(--c-border);
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 200;
  }
  .nav-brand { padding: 8px 12px; border-bottom: none; border-right: 2px solid var(--c-border); flex-shrink: 0; }
  .side-nav ol {
    display: flex;
    flex-direction: row;
    padding: 0;
    white-space: nowrap;
  }
  .side-nav ol li { flex-shrink: 0; }
  .side-nav ol li a {
    padding: 0 14px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    border-left: none;
    border-bottom: 3px solid transparent;
    font-size: 0.78rem;
  }
  .side-nav ol li a:hover,
  .side-nav ol li a[aria-current="page"] {
    border-left-color: transparent;
    border-bottom-color: var(--c-accent);
  }

  .page-body { margin-left: 0; padding-bottom: 60px; }

  .hero-section { flex-direction: column; min-height: auto; }
  .hero-collage { width: 100%; height: 180px; position: relative; }
  .hero-img-a { width: 55%; height: 80%; top: 10%; left: 5%; }
  .hero-img-b { width: 48%; height: 70%; bottom: 5%; right: 3%; }
  .hero-text { padding: 24px 20px; }
  .btn-primary { width: 100%; justify-content: center; }

  .content-section { flex-direction: column; padding: 24px 16px; }
  .content-section > aside,
  .faq-banner-section > aside,
  .about-header-section > aside,
  .privacy-header-section > aside,
  .guide-header-section > aside,
  .feature-intro-section > aside { width: 100%; padding-right: 0; padding-bottom: 16px; }

  .guide-nav-aside,
  .faq-quick-aside,
  .about-quick-aside,
  .privacy-aside,
  .feature-aside-top { flex-direction: column; }

  .cards-section { padding: 24px 16px; }
  .card-grid { grid-template-columns: 1fr; }

  .guide-banner,
  .faq-banner,
  .about-banner,
  .privacy-banner { padding: 24px 20px; min-height: 160px; }
  .guide-num-bg,
  .faq-num-bg,
  .about-bg-text,
  .privacy-bg-text { font-size: 4rem; }

  footer { padding: 16px; }
  footer p { gap: 8px; }
  footer p a { min-height: 40px; }
}
