@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

/* ===== 变量 ===== */
:root {
  --rose: #eb879c;
  --blush: #ffb6c1;
  --ink: #26171a;
  --ink-soft: #3e2329;
  --bg: #fff5f7;
  --bg-card: #fff9fa;
  --bg-aside: #fff0f3;
  --text: #2a1418;
  --text-muted: #6b3a44;
  --border: #f0c8d0;
  --nav-w: 220px;
  --radius: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 6px rgba(235,135,156,.13), 0 1px 2px rgba(38,23,26,.07);
  --shadow-md: 0 4px 16px rgba(235,135,156,.18), 0 2px 6px rgba(38,23,26,.08);
  --shadow-card: 0 2px 8px rgba(235,135,156,.12), 0 1px 3px rgba(38,23,26,.06);
  --transition: 220ms ease;
  --font-serif: 'Cormorant Garamond', 'Libre Baskerville', Georgia, serif;
  --font-body: 'Libre Baskerville', 'Cormorant Garamond', Georgia, serif;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 3px; }
ul { list-style: none; }

/* ===== 无障碍 ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== 公告条 ===== */
.announce-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 32px;
  background: var(--ink);
  color: var(--blush);
  font-size: .78rem;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  font-family: var(--font-serif);
}

/* ===== 布局骨架 ===== */
.site-wrap {
  display: flex;
  min-height: 100vh;
  padding-top: 32px;
}
.main-area {
  flex: 1;
  margin-left: var(--nav-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
main { flex: 1; padding: 2rem 2.5rem; }

/* ===== 侧边导航 ===== */
.side-nav {
  position: fixed;
  top: 32px;
  left: 0;
  width: var(--nav-w);
  height: calc(100vh - 32px);
  background: var(--ink);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding-bottom: 2rem;
}
.side-nav__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,182,193,.12);
}
.nav-logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-brand-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}
.side-nav__list {
  padding: 1rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.nav-section-title {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,182,193,.45);
  padding: .5rem .5rem .3rem;
  font-family: var(--font-serif);
}
.side-nav__list dd { margin: 0; }
.side-nav__list a {
  display: block;
  padding: .55rem .85rem;
  border-radius: var(--radius-pill);
  color: rgba(255,182,193,.85);
  font-size: .82rem;
  line-height: 1.4;
  font-family: var(--font-serif);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.side-nav__list a:hover,
.side-nav__list a:focus-visible {
  background: rgba(235,135,156,.18);
  color: #fff;
  outline: none;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
  font-family: var(--font-serif);
}
.breadcrumb a { color: var(--rose); }
.breadcrumb span[aria-hidden] { color: var(--border); }

/* ===== 眉题 ===== */
.eyebrow {
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--rose);
  font-family: var(--font-serif);
  font-weight: 600;
  margin-bottom: .35rem;
  text-transform: uppercase;
}

/* ===== Hero（首页）===== */
.hero-section {
  display: flex;
  gap: 2rem;
  align-items: center;
  min-height: 45vh;
  margin-bottom: 3rem;
}
.hero-aside {
  flex: 1;
  min-width: 0;
}
.hero-text { max-width: 480px; }
.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: .8rem;
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.hero-figure {
  flex: 0 0 auto;
  width: 340px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
}
.hero-img {
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}
.hero-img--a {
  width: 200px;
  height: 260px;
  margin-top: 0;
  z-index: 2;
}
.hero-img--b {
  width: 160px;
  height: 210px;
  margin-top: 50px;
  z-index: 1;
}

/* ===== 内容区（两栏）===== */
.content-section {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3rem;
  align-items: flex-start;
}
.content-body {
  flex: 1;
  min-width: 0;
}
.content-aside {
  flex: 0 0 220px;
  min-width: 180px;
}
.content-aside--right { order: 2; }
.content-body { order: 1; }

/* ===== 侧边栏卡片 ===== */
.aside-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: .7rem;
}
.aside-links { display: flex; flex-direction: column; gap: .35rem; }
.aside-links li a {
  font-size: .85rem;
  color: var(--text-muted);
  display: block;
  padding: .3rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), padding-left var(--transition);
  font-family: var(--font-serif);
}
.aside-links li a:hover { color: var(--rose); padding-left: .35rem; }
.aside-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}
.content-aside {
  background: var(--bg-aside);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  box-shadow: var(--shadow-sm);
}

/* ===== 卡片 ===== */
.cards-section {
  margin-bottom: 3rem;
}
.cards-section > .eyebrow { margin-bottom: .2rem; }
.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.cards-section > div,
.cards-section > .card {
  display: inline-block;
}
/* 卡片网格：article > div×n 直接子 */
.cards-section {
  display: block;
}
.cards-section > div.card {
  display: inline-flex;
  flex-direction: column;
  vertical-align: top;
  width: calc(33.33% - 1rem);
  margin: 0 .5rem 1.5rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  border-bottom: 3px solid var(--rose);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.card-body {
  padding: 1rem 1rem .5rem;
  flex: 1;
}
.card-date {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
  display: block;
  margin-bottom: .4rem;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .5rem;
  line-height: 1.4;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--rose); }
.card-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.card-foot {
  padding: .6rem 1rem .9rem;
}

/* ===== 药丸按钮 ===== */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--rose);
  color: #fff;
  font-size: .85rem;
  font-family: var(--font-serif);
  font-weight: 600;
  text-decoration: none;
  min-height: 40px;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 2px 8px rgba(235,135,156,.3);
}
.btn-pill:hover {
  background: var(--ink);
  color: var(--blush);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(38,23,26,.18);
}
.btn-pill:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}
.btn-pill--sm {
  padding: .35rem .9rem;
  font-size: .78rem;
  min-height: 36px;
}

/* ===== 栏目 Hero ===== */
.cat-hero-section {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, #fff0f3 0%, #fff9fa 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}
.cat-hero-figure {
  flex: 0 0 160px;
}
.cat-hero-img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.cat-hero-placeholder {
  width: 160px;
  height: 120px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blush) 0%, var(--rose) 100%);
  opacity: .35;
}
.cat-hero-aside { flex: 1; }
.cat-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
  line-height: 1.25;
}
.cat-desc { color: var(--text-muted); font-size: .95rem; }

/* ===== 文章 Hero ===== */
.art-header-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, #fff0f3 0%, #fff9fa 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}
.art-hero-figure { flex: 0 0 200px; }
.art-hero-img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.art-hero-placeholder {
  width: 200px;
  height: 150px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blush) 0%, var(--rose) 100%);
  opacity: .3;
}
.art-meta-aside { flex: 1; }
.art-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
  line-height: 1.3;
}
.art-desc { color: var(--text-muted); font-size: .92rem; margin-bottom: .7rem; }
.art-dates { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .8rem; }
.art-date {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
}
.art-date--mod { opacity: .75; }

/* ===== 关于页 Hero ===== */
.about-hero-section {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, #fff0f3 0%, #fff9fa 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}
.about-figure { flex: 0 0 160px; }
.about-img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.about-img-placeholder {
  width: 160px;
  height: 120px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blush) 0%, var(--rose) 100%);
  opacity: .35;
}
.about-aside { flex: 1; }
.about-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
}

/* ===== 隐私页 Hero ===== */
.privacy-header-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, #fff0f3 0%, #fff9fa 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}
.privacy-aside { flex: 1; }
.privacy-figure { flex: 0 0 120px; }
.privacy-deco {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blush) 0%, var(--rose) 100%);
  opacity: .25;
}
.privacy-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
}

/* ===== 散文正文 ===== */
.prose { font-size: 1rem; line-height: 1.8; color: var(--text); }
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 .7rem;
  padding-bottom: .3rem;
  border-bottom: 2px solid var(--blush);
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 1.5rem 0 .5rem;
}
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .35rem; }
.prose a { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose strong { color: var(--ink); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.prose th, .prose td {
  padding: .55rem .8rem;
  border: 1px solid var(--border);
  text-align: left;
}
.prose th {
  background: var(--bg-aside);
  font-family: var(--font-serif);
  font-weight: 600;
}
.prose blockquote {
  border-left: 3px solid var(--rose);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.2rem 0;
}

/* page-content 内正文样式（继承 prose 或独立）*/
.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.8rem 0 .6rem;
  border-bottom: 2px solid var(--blush);
  padding-bottom: .25rem;
}
.page-content h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 1.3rem 0 .4rem;
}
.page-content p { margin-bottom: .9rem; line-height: 1.8; }
.page-content ul, .page-content ol { padding-left: 1.4rem; margin-bottom: .9rem; }
.page-content li { margin-bottom: .3rem; }
.page-content a { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
.page-content strong { color: var(--ink); font-weight: 700; }
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.page-content th, .page-content td {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
}
.page-content th {
  background: var(--bg-aside);
  font-weight: 600;
  font-family: var(--font-serif);
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,182,193,.8);
  padding: 2rem 2.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-brand {
  flex: 1;
  min-width: 180px;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blush);
  display: block;
  margin-bottom: .5rem;
}
.footer-brand p { font-size: .82rem; line-height: 1.6; }
.footer-links {
  flex: 1;
  min-width: 180px;
}
.footer-links dl { display: flex; flex-direction: column; gap: .2rem; }
.footer-links dt {
  font-size: .72rem;
  letter-spacing: .12em;
  color: rgba(255,182,193,.45);
  font-family: var(--font-serif);
  margin-bottom: .3rem;
}
.footer-links dd { margin: 0; }
.footer-links a {
  font-size: .82rem;
  color: rgba(255,182,193,.75);
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .3rem 0;
  transition: color var(--transition);
  font-family: var(--font-serif);
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  flex: 0 0 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .76rem;
  color: rgba(255,182,193,.45);
  border-top: 1px solid rgba(255,182,193,.1);
  padding: .9rem 0 1rem;
  font-family: var(--font-serif);
}
.footer-copy a {
  color: rgba(255,182,193,.6);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.footer-copy a:hover { color: var(--blush); }

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 240ms ease, box-shadow 240ms ease; }
  .btn-pill { transition: background 220ms ease, box-shadow 220ms ease, transform 200ms ease, color 200ms ease; }
  .side-nav__list a { transition: background 200ms ease, color 200ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  :root { --nav-w: 0px; }
  .side-nav { display: none; }
  .main-area { margin-left: 0; }
  main { padding: 1.2rem 1rem; }

  .hero-section {
    flex-direction: column;
    min-height: auto;
    gap: 1.2rem;
  }
  .hero-figure {
    width: 100%;
    justify-content: center;
  }
  .hero-img--a { width: 150px; height: 200px; }
  .hero-img--b { width: 120px; height: 160px; margin-top: 40px; }

  .content-section {
    flex-direction: column;
    gap: 1.5rem;
  }
  .content-aside { flex: none; width: 100%; }
  .content-aside--right { order: -1; }

  .cards-section > div.card {
    width: calc(50% - 1rem);
  }

  .cat-hero-section,
  .art-header-section,
  .about-hero-section,
  .privacy-header-section {
    flex-direction: column;
    padding: 1.2rem 1rem;
  }
  .cat-hero-figure,
  .art-hero-figure,
  .about-figure,
  .privacy-figure { flex: none; width: 100%; }
  .cat-hero-img,
  .cat-hero-placeholder { width: 100%; height: 140px; }
  .art-hero-img,
  .art-hero-placeholder { width: 100%; height: 140px; }
  .about-img,
  .about-img-placeholder { width: 100%; height: 120px; }
  .privacy-deco { width: 80px; height: 80px; }

  .site-footer { padding: 1.5rem 1rem 0; gap: 1.2rem; }

  /* 移动端顶部补一个简单导航 */
  .site-wrap::before {
    content: '';
    display: block;
  }
}

@media (max-width: 900px) {
  /* 移动端底部粘性导航替代侧边栏 */
  .site-wrap {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .cards-section > div.card {
    width: 100%;
    margin: 0 0 1.2rem;
  }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-pill { width: 100%; text-align: center; }
  .footer-copy { flex-direction: column; align-items: flex-start; gap: .3rem; }
}

/* ===== 移动端顶部导航条 ===== */
@media (max-width: 900px) {
  .announce-bar { font-size: .7rem; height: 28px; }
  body { padding-top: 0; }

  /* 在移动端插入一个简易顶部导航（用 CSS 显示，side-nav 隐藏时备用）*/
  .main-area { padding-top: 0; }
}

/* 卡片在大屏的 flex 布局修正 */
.cards-section {
  display: block;
  overflow: hidden;
}
@supports (display: grid) {
  .cards-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.4rem;
  }
  .cards-section > small,
  .cards-section > h2 {
    grid-column: 1 / -1;
  }
  .cards-section > div.card {
    width: auto;
    margin: 0;
    display: flex;
  }
}

/* ===== 标签页样式复用 ===== */
.tag-header-section {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, #fff0f3 0%, #fff9fa 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}
.tag-aside { flex: 1; }
.tag-figure { flex: 0 0 160px; }
.tag-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
}
.tag-desc { color: var(--text-muted); font-size: .92rem; }
.tag-img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
}
.tag-img-placeholder {
  width: 160px;
  height: 120px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blush) 0%, var(--rose) 100%);
  opacity: .3;
}

/* ===== 通用 article 标题 ===== */
h2.section-title + .eyebrow,
.eyebrow + h2 {
  margin-top: .1rem;
}

/* ===== 焦点样式 ===== */
:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

/* ===== 内容区 h2 前的 small 眉题 ===== */
small.eyebrow + h2,
small.eyebrow + h3 {
  margin-top: .1rem;
}
