/* ============================================================
   LGL Family —— 站点样式
   想换主色，只改 :root 里 --accent 那一行就够了。
   ============================================================ */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #22201c;
  --ink-soft: #4a443c;
  --muted: #7c736a;
  --line: #e7e0d6;
  --accent: #b4492b;
  --accent-soft: #f6ece7;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1c1a16;
    --ink: #f2ede5;
    --ink-soft: #d8d0c5;
    --muted: #9a9086;
    --line: #2e2a24;
    --accent: #e0745a;
    --accent-soft: #2a1d18;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

.stage { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--muted); }
.nav a { transition: color 0.16s ease; white-space: nowrap; }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a.is-active { position: relative; }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -19px;
  height: 2px;
  background: var(--accent);
}

/* ---------- 主页 ---------- */

.home { padding: 64px 0 76px; }

.home-head { max-width: 720px; margin-bottom: 44px; }

.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-kicker::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 60px;
  background: var(--line);
}

.home-head h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5.4vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.028em;
  font-weight: 600;
  text-wrap: balance;
}

.home-head p {
  margin: 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.35);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.card-no {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.card-en {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  opacity: 0.75;
}

.card-name {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.card-desc {
  margin: 0 0 auto;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-arrow { color: var(--accent); transition: transform 0.2s ease; }
.card:hover .card-arrow { transform: translateX(4px); }

/* ---------- 板块头 ---------- */

.sec { padding: 52px 0 80px; }

.sec-head {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.sec-kicker {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.sec-head h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.6vw, 42px);
  line-height: 1.24;
  letter-spacing: -0.026em;
  font-weight: 600;
}

.sec-head p {
  margin: 0;
  max-width: 600px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
}

.dim-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}

.dim-legend b { color: var(--ink); font-weight: 600; margin-right: 7px; }

/* ---------- 时间线 ---------- */

.year-block { margin-bottom: 8px; }

.year-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 0 4px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.year-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.entry {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.entry:last-child { border-bottom: none; }

.entry-date {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding-top: 4px;
}

.entry-date span { display: block; font-size: 11px; letter-spacing: 0.1em; opacity: 0.7; }

.entry-body { display: flex; gap: 30px; align-items: flex-start; }

.entry-text { flex: 1; min-width: 0; }

.entry h2 {
  margin: 0 0 10px;
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.42;
  font-weight: 600;
  letter-spacing: -0.014em;
  transition: color 0.16s ease;
  text-wrap: balance;
}

.entry:hover h2 { color: var(--accent); }

.entry p {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; flex: none; }

.entry-thumb {
  width: 176px;
  height: 118px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: linear-gradient(135deg, var(--accent-soft), var(--line));
}

.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.entry:hover .entry-thumb img { transform: scale(1.05); }

/* ---------- 空状态 ---------- */

.empty {
  padding: 70px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- 文章页 ---------- */

.post-view { padding: 40px 0 80px; max-width: 680px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 34px;
  transition: color 0.16s ease;
}

.back:hover { color: var(--accent); }
.back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.post-head { max-width: 100%; margin-bottom: 34px; }

.post-head h1 {
  margin: 0 0 20px;
  font-size: clamp(27px, 4.4vw, 42px);
  line-height: 1.3;
  letter-spacing: -0.024em;
  font-weight: 600;
  text-wrap: balance;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.tag {
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.post-cover {
  margin: 0 0 48px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), var(--line));
}

.post-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.prose { max-width: 100%; font-size: 16.5px; line-height: 1.95; color: var(--ink-soft); }

.prose > *:first-child { margin-top: 0; }

.prose p { margin: 0 0 1.45em; }

.prose h2 {
  margin: 2.4em 0 0.9em;
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  font-weight: 600;
  color: var(--ink);
}

.prose h3 {
  margin: 2em 0 0.8em;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 15.5px;
}

.prose blockquote p { margin: 0; }

.prose ul { margin: 0 0 1.45em; padding-left: 0; list-style: none; }

.prose li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 0.5em;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.prose img {
  /* 小图按原尺寸显示（拉满会糊），大图缩到容器宽 */
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 2em auto;
  background: var(--line);
}

.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.prose strong { color: var(--ink); font-weight: 600; }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- 半星 ---------- */

.stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 26px;
  line-height: 1;
}

.star {
  position: relative;
  width: 1em;
  height: 1em;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  flex: none;
  transition: transform 0.14s ease;
}

.star:hover { transform: scale(1.1); }

.star-base,
.star-cut {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1;
}

.star-base { color: var(--muted); opacity: 0.38; }

.star-cut {
  overflow: hidden;
  color: var(--accent);
  transition: width 0.08s linear;
}

.star-cut > span { display: block; width: 1em; }

.stars.is-read { pointer-events: none; }

/* ---------- 大政审：列表 ---------- */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.case {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.case:hover { border-color: var(--accent); transform: translateY(-2px); }

.case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.case-kind {
  font-size: 11.5px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  flex: none;
}

.case-kind[data-kind="人"] { color: var(--accent); border-color: var(--accent); }

.case-date {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.case h2 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.36;
  letter-spacing: -0.016em;
  font-weight: 600;
  text-wrap: balance;
}

.case p {
  margin: 0 0 auto;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}

.case-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.case-total b {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.case-dims { font-size: 11.5px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }

/* ---------- 大政审：单个 ---------- */

.review-view { padding: 40px 0 90px; max-width: 720px; }

.case-head { margin-bottom: 34px; }

.case-head h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.28;
  letter-spacing: -0.024em;
  font-weight: 600;
  text-wrap: balance;
}

.case-intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 600px;
}

.verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.verdict-label {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 6px;
}

.verdict-num {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.verdict-num.is-empty {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  line-height: 1.5;
}

.verdict-meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.verdict-stars { flex: none; }
.verdict-stars .stars { font-size: 21px; }

.dims { display: grid; }

.dims-note {
  margin: 0 0 18px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.dim {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.dim:first-child { border-top: none; padding-top: 4px; }

.dim-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dim-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }

.dim-hint { font-size: 12px; color: var(--muted); }

.dim-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dim-val {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  min-width: 2.2em;
}

.dim-n { font-size: 12px; color: var(--muted); }

.dim-mine { margin-top: 8px; font-size: 12px; color: var(--muted); }

.review-note {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  opacity: 0.85;
}

/* ---------- 讲程录 ---------- */

.wall-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 12px;
  margin: 30px 0 36px;
}

.wall-form textarea {
  width: 100%;
  min-height: 64px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.75;
  resize: vertical;
  outline: none;
}

.wall-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.wall-hint { font-size: 11.5px; color: var(--muted); opacity: 0.8; }

.wall-btn {
  padding: 8px 18px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: opacity 0.16s ease;
}

.wall-btn:hover { opacity: 0.88; }
.wall-btn:disabled { opacity: 0.55; cursor: default; }

.wall-err { min-height: 16px; margin-top: 8px; font-size: 12.5px; color: #c0392b; }

.wall-need {
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  margin: 30px 0 36px;
}

.wall-list { display: grid; }

.wall-item {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.wall-item:first-child { border-top: none; padding-top: 0; }

.wall-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.wall-meta b { font-size: 13.5px; font-weight: 600; }
.wall-meta span { font-size: 12px; color: var(--muted); }

.wall-body { font-size: 15px; line-height: 1.85; color: var(--ink-soft); }

.wall-empty { padding: 40px 0; font-size: 14px; color: var(--muted); }

/* ---------- 详情页上的「编辑 / 删除」 ---------- */

.owner-ops {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 34px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.owner-tag {
  margin-right: auto;
  font-size: 11.5px;
  color: var(--muted);
}

.op-btn {
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.op-btn:hover { border-color: var(--accent); color: var(--accent); }
.op-btn.danger:hover { border-color: #c0392b; color: #c0392b; }
.op-btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- 评论区 ---------- */

.cmt {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 2px solid var(--line);
}

.cmt-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.cmt-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cmt-count { font-size: 12px; color: var(--muted); }

.cmt-list { display: grid; }

.cmt-item {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.cmt-item:first-child { border-top: none; padding-top: 0; }

.cmt-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.cmt-meta b { font-size: 13px; font-weight: 600; }

.cmt-me {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
}

.cmt-time { font-size: 11.5px; color: var(--muted); }

.cmt-del {
  margin-left: auto;
  padding: 0 2px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.7;
  transition: color 0.16s ease;
}

.cmt-del:hover { color: #c0392b; opacity: 1; }
.cmt-del:disabled { opacity: 0.4; cursor: default; }

.cmt-body {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.cmt-empty { padding: 20px 0; font-size: 13px; color: var(--muted); }

.cmt-form {
  margin-top: 22px;
  padding: 12px 14px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.cmt-form textarea {
  width: 100%;
  min-height: 52px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
  outline: none;
}

.cmt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.cmt-hint { font-size: 11.5px; color: var(--muted); opacity: 0.8; }

.cmt-btn {
  padding: 8px 18px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: opacity 0.16s ease;
}

.cmt-btn:hover { opacity: 0.88; }
.cmt-btn:disabled { opacity: 0.55; cursor: default; }

.cmt-err { min-height: 16px; margin-top: 6px; font-size: 12.5px; color: #c0392b; }

/* ---------- 门禁 ---------- */

body.locked .nav a { display: none; }
body.locked .site-footer { opacity: 0.5; }

.gate {
  min-height: 74vh;
  display: grid;
  place-items: center;
  padding: 48px 0 72px;
}

.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 30px 26px;
}

.gate-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 20px;
}

.gate-card h1 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.gate-card > p {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.gate-field { display: block; margin-bottom: 14px; }

.gate-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.gate-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease;
}

.gate-field input:focus { border-color: var(--accent); }

.gate-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.16s ease;
}

.gate-btn:hover { opacity: 0.88; }
.gate-btn:disabled { opacity: 0.55; cursor: default; }

.gate-err {
  min-height: 18px;
  margin-top: 12px;
  font-size: 13px;
  color: #c0392b;
}

.gate-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
  text-align: center;
}

.nav-user { display: inline-flex; align-items: center; gap: 10px; }
.nav-user .who { color: var(--ink); font-size: 13.5px; white-space: nowrap; }

.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.16s ease;
  white-space: nowrap;
}

.linkbtn:hover { color: var(--accent); }

@media (prefers-color-scheme: dark) {
  .gate-err, .wall-err, .cmt-err { color: #e08b7f; }
}

/* ---------- 上下篇 ---------- */

.post-nav {
  max-width: 100%;
  margin-top: 60px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.post-nav a {
  display: block;
  padding: 14px 0;
  min-width: 0;
}

.post-nav .label { font-size: 11.5px; color: var(--muted); letter-spacing: 0.08em; display: block; margin-bottom: 5px; }
.post-nav .title { font-size: 14.5px; font-weight: 500; line-height: 1.6; transition: color 0.16s ease; }
.post-nav a:hover .title { color: var(--accent); }
.post-nav .next { text-align: right; }

/* ---------- 关于页 ---------- */

.about-view { padding: 60px 0 90px; max-width: 660px; }
.about-view h1 { font-size: clamp(28px, 4.4vw, 40px); margin: 0 0 26px; letter-spacing: -0.024em; font-weight: 600; }
.about-view .prose li b { color: var(--ink); }
.about-view .prose li::before { top: 0.85em; }

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a:hover { color: var(--accent); }

/* ---------- 入场动画 ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.card, .entry, .case, .sec-head, .home-head,
.post-view > *, .review-view > *, .about-view > * { animation: rise 0.45s ease both; }

.card:nth-child(2) { animation-delay: 0.04s; }
.card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.12s; }

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

/* ---------- 响应式 ---------- */

@media (max-width: 820px) {
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .card { min-height: 0; }
  .case-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .stage { padding: 0 18px; }
  .header-inner { padding: 12px 18px; gap: 10px; }
  .nav { gap: 14px; font-size: 13px; }
  .nav a.is-active::after { bottom: -17px; }

  .home { padding: 40px 0 60px; }
  .home-head { margin-bottom: 32px; }
  .sec { padding: 34px 0 60px; }

  .entry { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
  .entry-date { display: flex; gap: 8px; align-items: baseline; padding-top: 0; }
  .entry-date span { display: inline; }
  .entry-body { gap: 16px; }
  .entry-thumb { width: 104px; height: 78px; }

  .post-nav { grid-template-columns: 1fr; gap: 8px; }
  .post-nav .next { text-align: left; }

  .verdict { flex-direction: column; align-items: flex-start; gap: 14px; }
  .review-view { padding: 28px 0 70px; }
  .stars { font-size: 24px; }
}

@media (max-width: 560px) {
  .brand-sub { display: none; }
  .header-inner { flex-wrap: wrap; row-gap: 6px; }
  .nav {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 12.5px;
  }
  .nav-user .who { display: none; }
}

@media (max-width: 460px) {
  .entry-thumb { display: none; }
}

/* ---------- 管理后台 ---------- */

.nav-link[hidden] { display: none !important; }

.adm-banner {
  display: block;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 26px 0 6px;
}

.adm-banner b { font-size: 15px; font-weight: 600; }
.adm-banner p { font-size: 13.5px; color: var(--ink-soft); margin: 8px 0 14px; line-height: 1.75; }

.adm-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 10px;
}

.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.adm-tab {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.adm-tab:hover { border-color: var(--accent); color: var(--accent); }
.adm-tab.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

.adm-msg { font-size: 13px; color: var(--accent); min-height: 20px; }

.adm-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 18px;
}

.adm-form-head { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.adm-form label { display: block; margin-bottom: 15px; }
.adm-form label > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

/* 「封面图」这一块不能再用 label 包（里面还有个 label 选文件），用 div 顶上 */
.adm-field { display: block; margin-bottom: 15px; }
.adm-field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

/* 真正接文件的那个 input，视觉上藏掉但不加 hidden 属性：
   某些手机浏览器对 display:none / hidden 的 input 点 label 不弹选择器 */
.adm-form input.adm-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.adm-form input,
.adm-form select,
.adm-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}

.adm-form textarea { resize: vertical; }
.adm-form input:focus,
.adm-form select:focus,
.adm-form textarea:focus { outline: none; border-color: var(--accent); }

.adm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.adm-actions { display: flex; gap: 12px; align-items: center; margin-top: 4px; flex-wrap: wrap; }

.adm-btn {
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.adm-btn:hover { opacity: 0.9; }
.adm-btn:disabled { opacity: 0.55; cursor: default; }
.adm-btn.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.adm-btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.adm-danger {
  font-family: inherit;
  font-size: 13px;
  padding: 9px 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  margin-left: auto;
}

.adm-err { font-size: 13px; color: var(--accent); min-height: 18px; margin-top: 8px; }
.adm-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

/* 「只显示你发布的」这句提示，要自己占一行，别跟按钮挤一起 */
.adm-scope {
  display: block;
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.adm-newrow { margin-bottom: 4px; }

/* ---- 写帖子时的图片区（粘贴 / 拖拽 / 选文件） ---- */
.adm-imgrow { display: flex; gap: 8px; align-items: stretch; }
.adm-imgrow input { flex: 1; min-width: 0; }
.adm-imgrow .adm-mini { flex: none; }

/* 选文件那个 label 要像个按钮，还得和输入框一样高 */
label.adm-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
}
label.adm-mini:active { border-color: var(--accent); color: var(--accent); }

.adm-bodyhead { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.adm-bodyhead > span { flex: 1; font-size: 12.5px; color: var(--muted); }
.adm-bodyhead .adm-mini { flex: none; }
.adm-bodyhead-hint { font-style: normal; }

.adm-form textarea.adm-body { display: block; }
.adm-form textarea.is-drop {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* 拖到封面那一行 / 整张表单时的示意 */
.adm-imgrow.is-drop input { border-color: var(--accent); background: var(--accent-soft); }
.adm-form.is-drop { box-shadow: inset 0 0 0 2px var(--accent-soft); }

/* 封面预览：传完能立刻看出来对不对 */
.adm-coverprev { margin-top: 10px; }
.adm-coverprev[hidden] { display: none; }
.adm-coverprev img {
  width: 168px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--line);
  display: block;
}

.adm-imgtip {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 7px 0 14px;
  min-height: 17px;
}
.adm-imgtip.is-bad { color: var(--accent); }

/* 正文里已有的图，缩略图排在输入框下面 */
.adm-imgstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}
.adm-imgstrip[hidden] { display: none; }
.adm-imgstrip a { display: block; }
.adm-imgstrip img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--line);
  display: block;
}

/* 评论区里的图别撑爆版面 */
.cmt-body img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  margin: 8px 0 2px;
  background: var(--line);
}

.adm-list { margin-top: 20px; border-top: 1px solid var(--line); }

.adm-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.adm-item-main { flex: 1; min-width: 0; }

.adm-item-title {
  font-size: 14.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-item-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.adm-item-btns { display: flex; gap: 8px; flex-shrink: 0; }

.adm-mini {
  font-family: inherit;
  font-size: 12.5px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.adm-mini:hover { border-color: var(--accent); color: var(--accent); }
.adm-mini.danger:hover { color: var(--accent); }

.adm-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 28px 0;
  line-height: 1.8;
}

@media (max-width: 640px) {
  .adm-row2 { grid-template-columns: 1fr; gap: 0; }
  .adm-form { padding: 18px; }
  .adm-item-title { white-space: normal; }
  /* 窄屏上这行说明会把「插入图片」挤下去，索性藏掉 */
  .adm-bodyhead-hint { display: none; }
  /* 手机上没有拖拽，提示换成粘贴 */
  .adm-imgtip { font-size: 12px; }
}

/* ---------- 登录名单 ---------- */

.mem-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  vertical-align: 1px;
}

.mem-role.is-admin {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.mem-me { font-size: 11px; color: var(--muted); margin-left: 5px; }

a.gate-btn:hover { opacity: 0.9; }
