:root {
  --rose: #b56b7c;
  --rose-deep: #8a4456;
  --blush: #f3d6de;
  --pearl: #fff8f6;
  --ink: #2a1f24;
  --muted: #7a6570;
  --line: rgba(138, 68, 86, 0.12);
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 50px rgba(90, 40, 55, 0.08);
  --radius: 18px;
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(243, 214, 222, 0.9), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 228, 214, 0.55), transparent 55%),
    linear-gradient(180deg, #fff7f4 0%, #f7ecef 42%, #fff9f7 100%);
  min-height: 100vh;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-deep); text-decoration: none; }
a:hover { color: var(--rose); }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.bg-glow {
  position: fixed;
  inset: auto -10% 10% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 107, 124, 0.18), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
  animation: floaty 12s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-30px, -20px, 0); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 248, 246, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff, transparent 40%),
    linear-gradient(135deg, #e8a0b0, #b56b7c 55%, #8a4456);
  box-shadow: 0 8px 20px rgba(138, 68, 86, 0.25);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.brand-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  letter-spacing: .08em;
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 1rem;
  margin-left: 1rem;
}

.site-nav a {
  color: var(--muted);
  font-size: .95rem;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--rose);
  transform: scaleX(0);
  transition: transform .25s ease;
  transform-origin: left;
}

.site-nav a:hover::after { transform: scaleX(1); }

.search-box {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  min-width: 200px;
}

.search-box input {
  border: 0;
  outline: 0;
  padding: .55rem 1rem;
  width: 100%;
  background: transparent;
  font: inherit;
  color: var(--ink);
}

.search-box button {
  border: 0;
  background: var(--rose-deep);
  color: #fff;
  padding: .55rem 1rem;
  cursor: pointer;
  font: inherit;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--rose-deep);
  margin: 6px 0;
}

.site-main {
  position: relative;
  z-index: 1;
  padding: 2.2rem 0 4rem;
}

.section-head { margin-bottom: 1.6rem; }
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: .04em;
}
.section-desc {
  margin: .45rem 0 0;
  color: var(--muted);
}

.article-list { display: grid; gap: 1rem; }

.list-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}

.list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(90, 40, 55, 0.12);
  color: inherit;
}

.list-thumb {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #f7dfe6, #f3e2d8);
  min-height: 100px;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.list-body h2 {
  margin: 0 0 .4rem;
  font-size: 1.15rem;
  line-height: 1.45;
  font-family: var(--font-display);
}

.list-body p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-meta {
  margin-top: .7rem;
  display: flex;
  gap: .8rem;
  color: var(--muted);
  font-size: .82rem;
}

.pagination ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  margin: 2rem 0 0;
  justify-content: center;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 .7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.pagination .is-active span {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 1.2rem;
}

.breadcrumb-current {
  min-width: 0;
}

/* 详情页：左内容 + 右推荐 */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.4rem;
  align-items: start;
}

.article,
.article-main {
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.2rem, 3vw, 2.4rem);
  box-shadow: var(--shadow);
  min-width: 0;
}

.article-meta {
  display: flex;
  gap: .8rem;
  align-items: center;
  color: var(--muted);
  font-size: .9rem;
}

.pill {
  display: inline-flex;
  padding: .15rem .7rem;
  border-radius: 999px;
  background: rgba(181, 107, 124, 0.12);
  color: var(--rose-deep);
  font-size: .82rem;
}

.article-title {
  margin: .6rem 0 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.35;
  letter-spacing: .03em;
}

.article-content {
  font-size: 1.05rem;
  color: #3a2c32;
}

.article-content p { margin: 0 0 1rem; }
.article-content img {
  margin: 1rem auto;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(90, 40, 55, 0.1);
}

.article-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 88px;
}

.side-panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: var(--shadow);
}

.side-panel[hidden] { display: none !important; }

.side-panel-title {
  margin: 0 0 .85rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: .04em;
  color: var(--rose-deep);
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .45rem;
}

.side-list a {
  display: block;
  padding: .5rem .65rem;
  border-radius: 12px;
  background: rgba(255, 248, 246, 0.95);
  border: 1px solid transparent;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.45;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.side-list a:hover {
  border-color: var(--blush);
  background: #fff;
  transform: translateX(2px);
  color: var(--rose-deep);
}

/* 兼容旧模板类名 */
.article-extra { display: grid; gap: 1rem; }
.block-card { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.block-title { margin: 0 0 .8rem; font-family: var(--font-display); font-size: 1.25rem; }
.link-list,
.title-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.link-list a,
.title-list a {
  display: block;
  padding: .55rem .8rem;
  border-radius: 12px;
  background: rgba(255, 248, 246, 0.9);
  border: 1px solid transparent;
  color: var(--ink);
}

.hz-ads {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.6rem;
  color: var(--muted);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-brand {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 .4rem;
}

.footer-icp { margin: 0; font-size: .88rem; }
.footer-icp a { color: var(--muted); }

.empty-tip {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border-radius: var(--radius);
}

@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 72px;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .search-box {
    display: none;
  }
  .header-inner { position: relative; }
  .list-item {
    grid-template-columns: 96px 1fr;
    gap: .8rem;
  }
  .list-body h2 { font-size: 1.02rem; }
}

@media (max-width: 560px) {
  .list-item { grid-template-columns: 1fr; }
  .list-thumb { max-height: 180px; }
  .article-sidebar {
    grid-template-columns: 1fr;
  }
  /* 手机端不显示面包屑中的文章标题（兼容新旧静态页） */
  .breadcrumb-sep-title,
  .breadcrumb-current,
  .breadcrumb > *:nth-last-child(-n+2) {
    display: none;
  }
}
