@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-primary: #56228b;
  --c-secondary: #8b4513;
  --c-ink: #1f1726;
  --c-primary-light: #7a3dbf;
  --c-primary-dim: #3a1760;
  --c-secondary-light: #b85e2a;
  --c-secondary-dim: #5c2d0d;
  --c-bg: #16101f;
  --c-bg2: #1f1726;
  --c-bg3: #271a30;
  --c-bg4: #2e1f3a;
  --c-surface: #231830;
  --c-text: #e8dff5;
  --c-text-muted: #a090b8;
  --c-border: rgba(86,34,139,0.35);
  --c-hr: rgba(139,69,19,0.5);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --shadow-soft: 0 4px 24px rgba(31,23,38,0.7);
  --shadow-card: 0 2px 16px rgba(86,34,139,0.25);
  --nav-h: 64px;
  --font-serif: 'Noto Serif JP', 'Georgia', serif;
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ===================== 重置 ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-bottom: calc(var(--nav-h) + 8px);
}
body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-secondary-light); }
ol, ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-serif); line-height: 1.3; }

/* ===================== 包装层 ===================== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: var(--nav-h);
}

/* ===================== 顶部品牌条 ===================== */
.top-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  background: var(--c-ink);
  border-bottom: 1px solid var(--c-border);
}
.top-bar-brand {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--c-primary-light);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.top-bar-tagline {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  font-weight: 300;
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(31,23,38,0.82) 0%,
    rgba(86,34,139,0.55) 50%,
    rgba(139,69,19,0.5) 100%
  );
}
.hero-blob {
  position: absolute;
  border-radius: 50% 62% 38% 70% / 55% 45% 65% 35%;
  opacity: 0.18;
  pointer-events: none;
}
.hero-blob--1 {
  width: 55vw; height: 45vw;
  background: radial-gradient(circle, var(--c-primary) 0%, transparent 70%);
  top: -10%; left: -15%;
  animation: blobDrift1 14s ease-in-out infinite alternate;
}
.hero-blob--2 {
  width: 40vw; height: 50vw;
  background: radial-gradient(circle, var(--c-secondary) 0%, transparent 70%);
  bottom: -15%; right: -10%;
  animation: blobDrift2 18s ease-in-out infinite alternate;
}
@keyframes blobDrift1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(6%,8%) scale(1.1); }
}
@keyframes blobDrift2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-5%,-6%) scale(1.08); }
}

.hero-bg-text {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: clamp(4rem, 16vw, 14rem);
  font-weight: 700;
  color: rgba(86,34,139,0.12);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.12em;
  z-index: 1;
  user-select: none;
}
.hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 1.5rem 5rem;
  max-width: 800px;
  width: 100%;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--c-secondary-light);
  background: rgba(139,69,19,0.18);
  border: 1px solid rgba(139,69,19,0.4);
  border-radius: 999px;
  padding: 0.25em 1.2em;
  margin-bottom: 1.2rem;
}
.hero-h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 24px rgba(86,34,139,0.6);
  margin-bottom: 1rem;
  line-height: 1.25;
}
.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--c-text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2.8em;
  height: 52px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dim) 100%);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(86,34,139,0.45);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 48px;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(86,34,139,0.6);
  color: #fff;
}

/* ===================== 内容区壳 ===================== */
.content-shell {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  width: 100%;
  align-items: flex-start;
}
.main-area {
  flex: 1 1 0;
  min-width: 0;
}
.page-article {
  width: 100%;
}
.content-section {
  width: 100%;
}

/* ===================== 正文内容样式 ===================== */
.content-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--c-primary-light);
  margin-top: 3rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
}
.content-section h2:first-child { margin-top: 0; }
.content-section h2 + hr {
  border: none;
  border-top: 2px solid var(--c-hr);
  margin-bottom: 1.5rem;
}
.content-section h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--c-secondary-light);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
.content-section h3 + hr {
  border: none;
  border-top: 1px solid var(--c-hr);
  margin-bottom: 1.2rem;
}
.content-section p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--c-text);
  margin-bottom: 1.2rem;
}
.content-section ul, .content-section ol {
  list-style: disc;
  padding-left: 1.6rem;
  margin-bottom: 1.2rem;
}
.content-section ol { list-style: decimal; }
.content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
  font-size: 1rem;
}
.content-section a {
  color: var(--c-primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-section a:hover { color: var(--c-secondary-light); }
.content-section blockquote {
  border-left: 4px solid var(--c-primary);
  padding: 0.8rem 1.2rem;
  background: rgba(86,34,139,0.12);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  color: var(--c-text-muted);
  font-style: italic;
}
.content-section hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 2rem 0;
}
.content-section article {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--c-border);
  scroll-margin-bottom: calc(var(--nav-h) + 12px);
}
.content-section article:last-child { border-bottom: none; }
.content-section article[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}
.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.content-section th {
  background: var(--c-bg4);
  color: var(--c-primary-light);
  padding: 0.7rem 1rem;
  text-align: left;
  font-family: var(--font-serif);
}
.content-section td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--c-border);
}
.content-section tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

/* ===================== 侧边栏 ===================== */
.sidebar {
  flex: 0 0 240px;
  width: 240px;
  position: sticky;
  top: 1.5rem;
  align-self: flex-start;
}
.sidebar-inner {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--c-primary-light);
  margin-bottom: 0.5rem;
}
.sidebar-inner hr {
  border: none;
  border-top: 1px solid var(--c-hr);
  margin-bottom: 1rem;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sidebar-nav dt a {
  display: block;
  font-size: 0.88rem;
  color: var(--c-text-muted);
  padding: 0.4em 0.6em;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  line-height: 1.5;
}
.sidebar-nav dt a:hover {
  background: rgba(86,34,139,0.2);
  color: var(--c-text);
}
.sidebar-nav dd {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  padding: 0.2em 0.6em;
}
.sidebar-deco {
  position: absolute;
  bottom: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50% 62% 38% 70% / 55% 45% 65% 35%;
  background: radial-gradient(circle, rgba(86,34,139,0.3), transparent 70%);
  pointer-events: none;
}

/* ===================== 页脚 ===================== */
.site-footer {
  background: var(--c-ink);
  border-top: 1px solid var(--c-border);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: auto;
}
.footer-top {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  align-items: flex-start;
}
.footer-brand-block { flex: 1 1 280px; }
.footer-logo { margin-bottom: 0.8rem; }
.brand-logo { max-height: 48px; width: auto; }
.brand-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-primary-light);
  letter-spacing: 0.06em;
}
.footer-desc {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.7;
  max-width: 380px;
}
.footer-contact-block { flex: 0 0 auto; }
.footer-contact-label {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--c-secondary-light);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.footer-contact-val {
  font-size: 0.9rem;
  color: var(--c-text-muted);
}
.footer-cols {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto 2rem;
}
.footer-dl {
  flex: 1 1 160px;
}
.footer-dl-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--c-primary-light);
  font-weight: 600;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--c-border);
}
.footer-dl dd {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-bottom: 0.4rem;
  line-height: 1.6;
}
.footer-dl dd a {
  color: var(--c-text-muted);
  transition: color var(--transition);
}
.footer-dl dd a:hover { color: var(--c-primary-light); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--c-border);
  text-align: center;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: var(--c-text-muted);
}

/* ===================== 底部固定导航 ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(31,23,38,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border);
  height: var(--nav-h);
  box-shadow: 0 -4px 24px rgba(31,23,38,0.8);
}
.bottom-nav ol {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.25rem;
}
.bottom-nav li {
  flex: 1 1 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  max-width: 160px;
}
.bottom-nav li:nth-child(4) {
  flex: 1.5 1 0;
}
.bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.4rem 0.15rem;
  font-size: clamp(0.62rem, 1.3vw, 0.82rem);
  color: var(--c-text-muted);
  text-align: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  line-height: 1.3;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.bottom-nav a:hover {
  color: var(--c-primary-light);
  background: rgba(86,34,139,0.15);
}
.bottom-nav li:nth-child(4) a {
  color: var(--c-primary-light);
  font-weight: 600;
  font-family: var(--font-serif);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
}

/* article scroll-margin-top for fixed nav */
article[id] {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

/* ===================== Scroll Reveal ===================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===================== 移动端 ===================== */
@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
  }
  .content-shell {
    flex-direction: column;
    padding: 2rem 1rem 3rem;
    gap: 1.5rem;
  }
  .sidebar {
    flex: none;
    width: 100%;
    position: static;
  }
  .footer-top {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-cols {
    gap: 1.5rem;
  }
  .footer-dl { flex: 1 1 120px; }
  .bottom-nav a {
    font-size: 0.6rem;
    padding: 0.4rem 0.1rem;
    min-height: 44px;
  }
  .hero { min-height: 70vh; }
  .hero-bg-text { font-size: clamp(3rem, 22vw, 8rem); }
}
@media (max-width: 480px) {
  :root {
    --nav-h: 52px;
  }
  .bottom-nav ol {
    gap: 0;
    padding: 0 0.1rem;
  }
  .bottom-nav li {
    max-width: none;
  }
  .bottom-nav a {
    font-size: 0.55rem;
    min-height: 44px;
    padding: 0.4rem 0.05rem;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .top-bar-tagline { display: none; }
  .hero-body { padding: 2rem 1rem 4rem; }
}

/* ===================== 无障碍/减动效 ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ===================== 打印 ===================== */
@media print {
  .bottom-nav, .top-bar { display: none; }
  .site-wrapper { padding-bottom: 0; }
  body { background: #fff; color: #000; }
}

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