@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 {
  --ice: #c8e0f4;
  --pink: #f5e0e8;
  --dark: #171f26;
  --ice-light: #dceefa;
  --ice-dark: #a8c8e8;
  --pink-light: #faeef4;
  --pink-dark: #e0c0d0;
  --dark-mid: #232f3a;
  --dark-light: #2e3f4f;
  --text: #1a2530;
  --text-muted: #4a5f72;
  --text-light: #7a8f9e;
  --radius-card: 28px;
  --radius-btn: 14px;
  --radius-sm: 10px;
  --shadow-up: -4px -4px 12px rgba(255,255,255,0.75), 5px 5px 14px rgba(0,0,0,0.13);
  --shadow-down: inset 3px 3px 8px rgba(0,0,0,0.12), inset -3px -3px 8px rgba(255,255,255,0.7);
  --shadow-pink-up: -4px -4px 12px rgba(255,255,255,0.7), 5px 5px 14px rgba(200,140,160,0.18);
  --font-serif: 'Noto Serif JP', 'Georgia', serif;
  --font-sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --max-content: 820px;
  --sidebar-w: 240px;
  --gap: 28px;
  --transition: 150ms ease;
}

/* ===== 重置 ===== */
*, *::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(--ice);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
a { color: var(--dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: #b04070; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
hr {
  border: none;
  border-top: 2px solid var(--ice-dark);
  margin: 12px 0 18px;
  opacity: 0.6;
}

/* ===== 公告条 ===== */
.site-announce {
  background: var(--dark);
  color: var(--ice);
  text-align: center;
  font-size: 13px;
  padding: 7px 16px;
  letter-spacing: 0.04em;
  font-family: var(--font-sans);
}

/* ===== Header ===== */
.site-header {
  background: linear-gradient(160deg, var(--ice-light) 0%, var(--ice) 60%, var(--pink-light) 100%);
  box-shadow: 0 4px 18px rgba(23,31,38,0.10);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-brand {
  border-bottom: 1px solid rgba(168,200,232,0.4);
  padding: 14px 24px;
}
.brand-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-icon {
  font-size: 26px;
  color: var(--dark);
  line-height: 1;
}
.brand-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand-name:hover { color: #b04070; }
.brand-desc {
  font-size: 12px;
  color: var(--text-muted);
  border-left: 2px solid var(--ice-dark);
  padding-left: 12px;
  margin-left: 4px;
  line-height: 1.4;
}

/* ===== 导航 nav > p > a ===== */
.site-nav {
  padding: 0 24px;
  background: linear-gradient(90deg, var(--ice) 0%, var(--pink-light) 100%);
}
.site-nav > p {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: stretch;
}
.site-nav > p > a {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  min-height: 44px;
}
.site-nav > p > a:hover,
.site-nav > p > a.active {
  color: #b04070;
  border-bottom-color: #b04070;
  background: rgba(245,224,232,0.5);
}

/* ===== 主布局 ===== */
.page-main { min-height: 70vh; }

.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--gap) 24px;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--gap);
  align-items: start;
}

/* ===== 侧边栏 aside 在内容左侧 ===== */
.page-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 110px;
}
.aside-card {
  background: linear-gradient(145deg, var(--ice-light), var(--ice));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-up);
  padding: 20px 18px;
  border-bottom: 3px solid var(--ice-dark);
}
.aside-card h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}
.aside-links { display: flex; flex-direction: column; gap: 4px; }
.aside-links li a {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.aside-links li a:hover {
  background: var(--pink-light);
  color: #b04070;
}
.aside-info { background: linear-gradient(145deg, var(--pink-light), var(--ice-light)); border-bottom-color: var(--pink-dark); }
.aside-info p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ===== 主内容 ===== */
.main-content { min-width: 0; }

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: #b04070; }
.breadcrumb span { color: var(--text-light); }

/* ===== content-section / figure 结构 ===== */
.content-section {
  background: linear-gradient(145deg, var(--ice-light), var(--ice));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-up);
  padding: 36px 40px;
  border-bottom: 4px solid var(--ice-dark);
}
.content-figure {
  margin-bottom: 28px;
}
.page-h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 10px;
}
.page-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-top: 6px;
}
.page-meta time { color: #b04070; }

/* ===== 正文 ===== */
.prose {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--dark);
  margin: 32px 0 6px;
}
.prose h2 + hr { margin-bottom: 14px; }
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-mid);
  margin: 24px 0 6px;
}
.prose h3 + hr { margin-bottom: 12px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; }
.prose a { color: #7040a0; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #b04070; }
.prose strong { font-weight: 700; color: var(--dark); }
.prose blockquote {
  border-left: 4px solid var(--pink-dark);
  padding: 10px 18px;
  background: var(--pink-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 18px 0;
  font-style: italic;
  color: var(--text-muted);
}

/* ===== section-title ===== */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

/* ===== hr 装饰 ===== */
.section-title + hr { margin-bottom: 24px; opacity: 0.5; }

/* ===== neu-card 通用 ===== */
.neu-card {
  background: linear-gradient(145deg, var(--ice-light), var(--ice));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-up);
  padding: 24px;
  border-bottom: 3px solid var(--ice-dark);
}

/* ===== 首页 Hero ===== */
.layout-home { background: var(--dark); }
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.hero-figure {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 80px 60px 80px 40px;
  position: relative;
  text-align: right;
}
.hero-bg-text {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: clamp(120px, 20vw, 240px);
  font-weight: 700;
  color: rgba(200,224,244,0.04);
  user-select: none;
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ice-dark);
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 500;
}
.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--ice);
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 600px;
}
.hero-sub {
  font-size: 16px;
  color: var(--ice-dark);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--pink-light), var(--pink));
  color: var(--dark);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-pink-up);
  min-height: 48px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { transform: scale(0.97); box-shadow: var(--shadow-down); color: #b04070; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(200,224,244,0.15), rgba(200,224,244,0.08));
  color: var(--ice);
  font-weight: 500;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(200,224,244,0.3);
  min-height: 48px;
  transition: background var(--transition), color var(--transition);
}
.btn-secondary:hover { background: rgba(200,224,244,0.25); color: #fff; }

.hero-aside {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 40px 80px 20px;
}
.quick-links {
  background: linear-gradient(145deg, rgba(200,224,244,0.12), rgba(200,224,244,0.06));
  border-radius: var(--radius-card);
  box-shadow: -3px -3px 10px rgba(255,255,255,0.06), 4px 4px 12px rgba(0,0,0,0.25);
  padding: 24px 20px;
  border-bottom: 3px solid rgba(168,200,232,0.3);
}
.quick-links h2 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ice);
  margin-bottom: 8px;
}
.quick-links hr { border-color: rgba(168,200,232,0.25); }
.quick-links ul { display: flex; flex-direction: column; gap: 4px; }
.quick-links ul li a {
  display: block;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ice-dark);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.quick-links ul li a:hover { background: rgba(200,224,244,0.15); color: var(--pink-light); }

/* 首页其他 div */
.home-intro-section, .cat-section, .latest-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}
.home-intro-section { padding-top: 56px; }
.home-prose {
  background: linear-gradient(145deg, var(--ice-light), var(--ice));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-up);
  padding: 36px 40px;
  border-bottom: 4px solid var(--ice-dark);
}
.page-home .home-intro-section figure { margin: 0; }

/* 分类卡片 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 22px;
}
.cat-card {
  background: linear-gradient(145deg, var(--ice-light), var(--ice));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-up);
  border-bottom: 4px solid var(--ice-dark);
  transition: transform var(--transition), box-shadow var(--transition);
  opacity: 0;
  transform: translateY(20px);
}
.cat-card.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: transform 400ms ease calc(var(--card-delay, 0ms) + 0ms), box-shadow var(--transition), opacity 400ms ease calc(var(--card-delay, 0ms) + 0ms);
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: -6px -6px 18px rgba(255,255,255,0.8), 7px 7px 20px rgba(0,0,0,0.15);
}
.cat-card-inner { padding: 28px 24px; }
.cat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: rgba(168,200,232,0.6);
  line-height: 1;
  margin-bottom: 10px;
}
.cat-card h3 { font-family: var(--font-serif); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.cat-card h3 a { color: var(--dark); }
.cat-card h3 a:hover { color: #b04070; }
.cat-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.cat-link {
  font-size: 13px;
  font-weight: 600;
  color: #7040a0;
  letter-spacing: 0.02em;
}
.cat-link:hover { color: #b04070; }

/* 文章列表 table */
.table-wrap { overflow-x: auto; border-radius: var(--radius-card); }
.art-table, .child-table, .tag-table {
  width: 100%;
  background: linear-gradient(145deg, var(--ice-light), var(--ice));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-up);
  overflow: hidden;
  border-bottom: 4px solid var(--ice-dark);
}
.art-table th, .child-table th, .tag-table th {
  background: var(--dark);
  color: var(--ice);
  padding: 14px 18px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.art-table td, .child-table td, .tag-table td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid rgba(168,200,232,0.3);
  vertical-align: top;
  color: var(--text);
}
.art-table tr:last-child td, .child-table tr:last-child td, .tag-table tr:last-child td { border-bottom: none; }
.art-row:hover td, .child-row:hover td, .tag-row:hover td { background: var(--pink-light); }
.art-title-cell a, .child-title a, .tag-row-title a {
  color: var(--dark);
  font-weight: 500;
}
.art-title-cell a:hover, .child-title a:hover, .tag-row-title a:hover { color: #b04070; }
.art-date-cell time, .child-date time, .tag-row-date time { color: var(--text-muted); font-size: 12px; }
.child-num, .tag-row-num { color: var(--text-light); font-size: 12px; font-weight: 600; font-family: var(--font-serif); }

/* scroll reveal 基础 */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 500ms ease, transform 500ms ease; }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ===== section layout ===== */
.article-figure { margin-bottom: 28px; }
.article-h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.article-hero-img { width: 100%; border-radius: var(--radius-card); margin-bottom: 20px; box-shadow: var(--shadow-up); }
.article-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-top: 8px;
}
.article-meta time { color: #b04070; }
.article-meta a { color: #7040a0; }
.article-section { display: flex; flex-direction: column; gap: 32px; }
.article-bottom-aside {
  background: linear-gradient(145deg, var(--pink-light), var(--ice-light));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pink-up);
  padding: 24px 28px;
  border-bottom: 3px solid var(--pink-dark);
}
.article-bottom-aside h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.inline-related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.inline-related li a {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: linear-gradient(145deg, var(--ice-light), var(--ice));
  border-radius: 20px;
  font-size: 13px;
  color: var(--dark);
  box-shadow: var(--shadow-up);
  min-height: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.inline-related li a:hover {
  transform: scale(0.96);
  box-shadow: var(--shadow-down);
  color: #b04070;
}

/* ===== about layout ===== */
.about-figure { margin-bottom: 24px; }
.about-badge, .privacy-badge, .tag-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  background: linear-gradient(145deg, var(--pink-light), var(--pink));
  color: var(--dark);
  box-shadow: var(--shadow-pink-up);
}
.about-section { display: flex; flex-direction: column; gap: 28px; }
.about-stats { background: linear-gradient(145deg, var(--pink-light), var(--ice-light)); border-bottom-color: var(--pink-dark); }
.about-stats h2 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.stat-item { text-align: center; padding: 16px 10px; background: var(--ice-light); border-radius: 16px; box-shadow: var(--shadow-up); }
.stat-num { display: block; font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--dark); }
.stat-label { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== privacy layout ===== */
.privacy-section { display: flex; flex-direction: column; gap: 24px; }
.privacy-figure { margin-bottom: 4px; }
.privacy-notice {
  background: linear-gradient(145deg, var(--pink-light), var(--ice-light));
  border-bottom-color: var(--pink-dark);
}
.privacy-notice h2 { font-family: var(--font-serif); font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.privacy-notice p { font-size: 14px; color: var(--text-muted); }

/* ===== tag layout ===== */
.tag-section { display: flex; flex-direction: column; gap: 24px; }
.tag-figure { margin-bottom: 4px; }
.tag-list-aside { margin-top: 8px; }
.tag-list-aside h2 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; color: var(--dark); }

/* ===== cat layout ===== */
.cat-section.child-section {
  margin-top: 32px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  border: none;
}
.cat-prose { margin-bottom: 0; }

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  margin-top: 48px;
}
.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px;
  border-bottom: 1px solid rgba(200,224,244,0.12);
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ice);
  flex-wrap: wrap;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--pink-light), var(--pink));
  color: var(--dark);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-pink-up);
  min-height: 48px;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition);
}
.cta-btn:hover { transform: scale(0.97); box-shadow: var(--shadow-down); color: #b04070; }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-address {
  font-size: 13px;
  color: rgba(200,224,244,0.5);
  font-style: normal;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.footer-links li a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 13px;
  color: rgba(200,224,244,0.6);
  border-radius: var(--radius-sm);
  min-height: 40px;
  transition: color var(--transition), background var(--transition);
}
.footer-links li a:hover { color: var(--ice); background: rgba(200,224,244,0.1); }

/* ===== 移动端断点 ===== */
@media (max-width: 900px) {
  .main-wrapper {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }
  .page-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .hero-section { flex-direction: column; min-height: auto; }
  .hero-figure { align-items: flex-start; text-align: left; padding: 60px 24px 40px; }
  .hero-bg-text { display: none; }
  .hero-actions { justify-content: flex-start; }
  .hero-aside { width: 100%; padding: 0 24px 40px; }
  .quick-links { display: none; }
  .content-section { padding: 24px 20px; }
  .home-intro-section, .cat-section, .latest-section { padding: 32px 16px; }
  .home-prose { padding: 24px 20px; }
}

@media (max-width: 600px) {
  .site-nav > p > a {
    padding: 10px 10px;
    font-size: 13px;
    min-height: 44px;
  }
  .brand-desc { display: none; }
  .brand-name { font-size: 16px; }
  .page-h1 { font-size: 1.5rem; }
  .hero-h1 { font-size: 1.8rem; }
  .cat-grid { grid-template-columns: 1fr; }
  .page-aside { grid-template-columns: 1fr; }
  .footer-cta { flex-direction: column; align-items: flex-start; font-size: 15px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .art-desc-cell, .child-desc, .tag-row-desc { display: none; }
  .content-section { padding: 20px 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-primary, .btn-secondary, .cta-btn { min-height: 44px; }
}

/* ===== 无障碍：减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal], .cat-card { opacity: 1 !important; transform: none !important; }
}
