/* ==========================================================================
   寻欢阁 静态站模板 · 前端样式
   仿站来源：https://xunhuange.cfd/
   说明：本站点原始 CSS 文件在抓取时无法获取（渲染通道限流），
        因此本文件是依据页面实际可见结构（页头、筛选栏、卡片栅格、
        数据表、FAQ、页脚 CTA）重新实现的一套主题样式，非原始 CSS。
        如需换成原站样式，只需整体替换本文件，类名保持即可。
   ========================================================================== */

:root {
  --paper: #f5f2ea;
  --surface: #fffdf8;
  --ink: #1f2326;
  --ink-soft: #454b4f;
  --muted: #6b7074;
  --line: #cdc7ba;
  --line-strong: #1f2326;
  --red: #c2402f;
  --red-dark: #96291d;
  --teal: #17655f;
  --gold: #b6812a;
  --chip: #eae5da;
  --shadow: 0 10px 28px rgba(31, 35, 38, 0.08);
  --radius: 4px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  padding-bottom: 96px; /* 给底部固定 CTA 留位 */
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

img { display: block; max-width: 100%; height: auto; }

button, input { font: inherit; }

.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;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 布局容器 ---------- */
.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 242, 234, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-inner {
  width: min(calc(100% - 32px), var(--max));
  min-height: 68px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.brand img {
  width: 40px; height: 40px;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}
.brand strong { font-size: 18px; }

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.site-nav a {
  position: relative;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 700;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--red);
  transition: right 180ms ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }

.header-note {
  padding: 4px 8px;
  color: var(--red);
  border: 1px solid var(--red);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 9px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
}

/* ---------- 首页 hero + 搜索 ---------- */
.hero {
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  max-width: 900px;
  margin: 14px 0 18px;
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 900;
  line-height: 1.22;
}
.hero .lead {
  max-width: 800px;
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: 17px;
}
.eyebrow {
  display: inline-block;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- 搜索框 ---------- */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
  margin: 0 0 26px;
}
.search-form input {
  flex: 1 1 220px;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.search-form input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}
.search-form button {
  min-height: 46px;
  padding: 8px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.search-form button:hover { background: var(--red); border-color: var(--red); }

/* ---------- 快捷链接条 ---------- */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick-links a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}
.quick-links a:hover { border-color: var(--red); }

/* ---------- 区块与标题 ---------- */
.section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.3;
}
.section-head p { max-width: 820px; margin: 0; color: var(--muted); font-size: 15px; }

h2 { margin: 40px 0 12px; font-size: 26px; font-weight: 900; line-height: 1.35; }
h2:first-child { margin-top: 0; }
h3 { margin: 24px 0 8px; font-size: 19px; font-weight: 800; line-height: 1.4; }
p { margin: 0 0 14px; }

/* ---------- 筛选栏 / 标签 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.filter-bar button {
  min-height: 38px;
  padding: 6px 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.filter-bar button[aria-pressed="true"],
.filter-bar button:hover { background: var(--ink); color: #fff; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.chip {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  font-size: 13px;
}
.filter-note {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 10px;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: var(--radius);
}

/* ---------- 卡片栅格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, transform 160ms ease;
}
.card:hover { border-color: var(--red); transform: translateY(-2px); }
.card h2, .card h3 { margin: 0; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .tag {
  margin-top: auto;
  padding-top: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}
.card a { font-weight: 700; }

/* 数字型统计条 */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin: 0 0 24px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat-item { padding: 18px 20px; background: var(--surface); }
.stat-item strong { display: block; font-size: 22px; font-weight: 900; }
.stat-item span { color: var(--muted); font-size: 13px; }

/* ---------- 面包屑 / 页面头 ---------- */
.crumbs {
  padding: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.crumbs a:hover { color: var(--red); }

.page-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  max-width: 900px;
  margin: 12px 0 14px;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  line-height: 1.25;
}
.page-hero .lead { max-width: 820px; color: var(--ink-soft); font-size: 16px; }
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.page-meta span {
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

.page-body { padding: 44px 0 64px; }
.page-body > *:first-child { margin-top: 0; }

/* ---------- 数据表 ---------- */
.data-table,
.fact-table {
  width: 100%;
  margin: 20px 0 28px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
}
.data-table th,
.data-table td,
.fact-table th,
.fact-table td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th,
.fact-table th { background: #e9e4d9; font-weight: 800; }

/* ---------- 提示框 ---------- */
.notice {
  margin: 26px 0;
  padding: 18px 20px;
  background: #e6f0ed;
  border: 1px solid #9dbbb6;
  border-radius: var(--radius);
}
.note {
  margin: 22px 0;
  padding: 16px 18px;
  background: var(--surface);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 16px 40px 16px 0;
  font-weight: 800;
  cursor: pointer;
}
.faq details p { max-width: 860px; padding: 0 0 16px; color: var(--muted); }

/* ---------- 正文列表 ---------- */
.page-body ul,
.page-body ol { padding-left: 22px; }
.page-body li { margin-bottom: 8px; color: var(--ink-soft); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: #fff;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(120px, 0.7fr));
  gap: 32px;
  padding: 48px 0 34px;
}
.footer-brand { font-size: 22px; font-weight: 900; }
.footer-main p { max-width: 420px; margin: 0; color: #b9bfbf; font-size: 13px; }
.footer-col strong {
  display: block;
  margin-bottom: 10px;
  color: #eeb0a6;
  font-size: 12px;
}
.footer-col a {
  display: block;
  padding: 4px 0;
  color: #d3d8d8;
  font-size: 13px;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding: 16px 0;
  border-top: 1px solid #42474a;
  color: #a8aeb0;
  font-size: 12px;
}

/* ---------- 底部固定 CTA（共用区块） ---------- */
.site-cta {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 620px);
  min-height: 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(26, 24, 22, 0.28);
  font-weight: 900;
  /* 左侧图标与右侧箭头默认值，可被 partials/config.js 覆盖 */
  --cta-icon: "寻";
  --cta-arrow: "→";
}
.site-cta::before {
  content: var(--cta-icon);
  width: 33px; height: 33px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--red);
  border-radius: 50%;
}
.site-cta::after { content: var(--cta-arrow); font-size: 21px; }
.site-cta:hover,
.site-cta:focus-visible { background: var(--red-dark); color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .header-note { display: none; }
  .nav-toggle { display: block; justify-self: end; }
  .site-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 12px 16px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding: 10px 0; }
  .footer-main { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  body { padding-bottom: 88px; }
  .container, .header-inner { width: min(calc(100% - 24px), var(--max)); }
  .hero { padding: 40px 0 32px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .data-table, .fact-table,
  .data-table tbody, .fact-table tbody,
  .data-table tr, .fact-table tr,
  .data-table th, .data-table td,
  .fact-table th, .fact-table td { display: block; width: 100%; }
  .data-table th, .fact-table th { border-bottom: 0; }
  .site-cta { bottom: 9px; width: calc(100% - 18px); font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
