:root {
  --ink: #243447;
  --ink-soft: #46566a;
  --paper: #f7f5f1;
  --card: #ffffff;
  --line: #e5e0d6;
  --accent: #b07d34;
  --accent-deep: #8a6220;
  --muted: #8a93a0;
  --shadow: 0 6px 22px rgba(36, 52, 71, 0.08);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1160px, 92vw); margin: 0 auto; }

/* ---------- 页头 ---------- */
.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__logo { width: 40px; height: 40px; }
.brand__name { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; color: var(--ink); }
.nav { display: flex; gap: 6px; margin-left: 8px; }
.nav__link {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 15px;
  transition: background .15s, color .15s;
}
.nav__link:hover { background: var(--paper); color: var(--ink); }
.nav__link.is-active { color: var(--accent-deep); background: #f3ead8; font-weight: 600; }
.header__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav__user { color: var(--ink-soft); font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 8px; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s; font-family: inherit;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn--block { width: 100%; }
.btn--danger { background: #b3503f; color: #fff; }
.btn--danger:hover { background: #973f31; }

.nav__toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; margin-left: auto; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

/* ---------- 通用区块 ---------- */
.section { padding: 48px 0; }
.section__head { margin-bottom: 24px; }
.section__title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.section__sub { color: var(--muted); margin: 0; font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 首页 Hero ---------- */
.hero {
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}
.hero__inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero__text { flex: 1 1 420px; }
.hero__title { font-size: 32px; line-height: 1.35; margin: 0 0 14px; font-weight: 800; }
.hero__title span { color: var(--accent-deep); }
.hero__desc { color: var(--ink-soft); font-size: 16px; margin: 0 0 24px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__panel {
  flex: 1 1 320px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.hero__panel h3 { margin: 0 0 14px; font-size: 17px; }
.hero__stats { display: flex; gap: 18px; }
.hero__stat { flex: 1; text-align: center; }
.hero__stat b { display: block; font-size: 26px; color: var(--accent-deep); }
.hero__stat span { font-size: 13px; color: var(--muted); }

/* ---------- 类目导航 ---------- */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 10px; text-align: center; transition: all .15s; box-shadow: var(--shadow);
}
.cat:hover { transform: translateY(-3px); border-color: var(--accent); }
.cat__icon { width: 34px; height: 34px; color: var(--accent); margin: 0 auto 8px; }
.cat__icon svg { width: 100%; height: 100%; }
.cat__name { font-size: 14px; font-weight: 600; }

/* ---------- 信息卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lcard { overflow: hidden; display: flex; flex-direction: column; transition: all .15s; }
.lcard:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(36,52,71,.12); }
.lcard__cover { height: 170px; background: #eef0f2; position: relative; overflow: hidden; }
.lcard__cover img { width: 100%; height: 100%; object-fit: cover; }
.lcard__cat {
  position: absolute; left: 12px; top: 12px; background: rgba(36,52,71,.82); color: #fff;
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
}
.lcard__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lcard__title { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.4; }
.lcard__summary { color: var(--ink-soft); font-size: 13.5px; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard__meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.lcard__region { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 筛选条 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  padding: 7px 16px; border-radius: 20px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; cursor: pointer; color: var(--ink-soft); transition: all .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.search { display: flex; gap: 8px; flex: 1 1 280px; }
.search input { flex: 1; }

input[type=text], input[type=password], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; outline: none; transition: border .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 140px; line-height: 1.7; }

/* ---------- 详情 ---------- */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.detail__main { padding: 28px; }
.detail__cover { height: 280px; border-radius: var(--radius); overflow: hidden; background: #eef0f2; margin-bottom: 22px; }
.detail__cover img { width: 100%; height: 100%; object-fit: cover; }
.detail__title { font-size: 26px; margin: 0 0 12px; }
.detail__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tag { background: #f3ead8; color: var(--accent-deep); font-size: 13px; padding: 4px 12px; border-radius: 20px; }
.detail__content { color: var(--ink-soft); font-size: 15.5px; }
.detail__content p { margin: 0 0 14px; }
.detail__side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }
.sidecard { padding: 22px; }
.sidecard h4 { margin: 0 0 14px; font-size: 16px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; }
.sidecard__note { font-size: 13px; color: var(--muted); margin: 14px 0 0; line-height: 1.6; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-deep); margin-bottom: 16px; font-size: 14px; }

/* ---------- 表单页 ---------- */
.formwrap { max-width: 560px; margin: 0 auto; padding: 36px 0; }
.formwrap__title { font-size: 24px; margin: 0 0 6px; }
.formwrap__sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 12px; }
.check input { width: auto; margin-top: 4px; }
.check a { color: var(--accent-deep); text-decoration: underline; }
.msg { font-size: 13.5px; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; display: none; }
.msg--err { background: #fbeae7; color: #973f31; display: block; }
.msg--ok { background: #e8f1e6; color: #3f6b39; display: block; }
.authcard { max-width: 420px; margin: 0 auto; padding: 40px 28px; }
.authtabs { display: flex; gap: 8px; margin-bottom: 22px; }
.authtab { flex: 1; text-align: center; padding: 10px; border-radius: 8px; cursor: pointer; background: var(--paper); color: var(--ink-soft); font-weight: 600; }
.authtab.is-active { background: var(--accent); color: #fff; }
.authpanel { display: none; }
.authpanel.is-active { display: block; }

/* ---------- 关于 ---------- */
.about__hero { padding: 48px 0 30px; }
.about__lead { font-size: 17px; color: var(--ink-soft); max-width: 760px; }
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.feature { padding: 24px; }
.feature__icon { width: 38px; height: 38px; color: var(--accent); margin-bottom: 12px; }
.feature h4 { margin: 0 0 8px; font-size: 16px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.prose { max-width: 820px; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; }
.prose p { color: var(--ink-soft); }
.contactbox { padding: 26px; margin-top: 24px; }
.contactbox h4 { margin: 0 0 14px; }
.contactbox .kv b { color: var(--ink); }

/* ---------- 后台 ---------- */
.adminbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.adminbar .seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.adminbar .seg button { border: 0; background: #fff; padding: 9px 16px; cursor: pointer; font-size: 14px; color: var(--ink-soft); font-family: inherit; }
.adminbar .seg button.is-active { background: var(--accent); color: #fff; }
.tablewrap { overflow-x: auto; }
table.admin { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.admin th, table.admin td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
table.admin th { background: var(--paper); color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
table.admin tr:last-child td { border-bottom: 0; }
.status { font-size: 12.5px; padding: 3px 10px; border-radius: 20px; }
.status--approved { background: #e8f1e6; color: #3f6b39; }
.status--pending { background: #f6ecd6; color: #8a6220; }
.status--rejected { background: #fbeae7; color: #973f31; }
.row-actions { display: flex; gap: 8px; }
.mini { padding: 6px 12px; font-size: 13px; }

/* ---------- 页脚 ---------- */
.footer { background: var(--ink); color: #cfd6df; margin-top: 56px; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 36px; padding: 44px 0 28px; }
.footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.footer__brand img { width: 34px; height: 34px; }
.footer__desc { font-size: 13.5px; color: #aab4c0; max-width: 360px; }
.footer__title { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer__list { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.footer__list li { margin-bottom: 8px; color: #aab4c0; }
.footer__list--inline { display: flex; gap: 16px; margin-top: 12px; }
.footer__list--inline a { color: #cfd6df; text-decoration: underline; }
.footer__note { font-size: 13px; color: #aab4c0; margin: 0; line-height: 1.6; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #9aa4b0; flex-wrap: wrap; gap: 10px; }
.footer__icp { color: #cfd6df; text-decoration: underline; }

/* ---------- 空态 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { width: 54px; height: 54px; color: var(--line); margin-bottom: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
  .detail__side { position: static; }
  .about__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 12px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .header.is-open .nav { display: flex; }
  .header__right { display: none; }
  .nav__toggle { display: flex; }
  .grid { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 36px 0; }
  .hero__title { font-size: 26px; }
}
