/* InnuendoJokes · 客户端样式（移动优先，零外部依赖） */
:root {
  --brand: #FF6B35;
  --brand-soft: #FFF1EB;
  --text: #1F2328;
  --muted: #656D76;
  --faint: #8B949E;
  --line: #EAEAEA;
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --radius: 12px;
  --maxw: 720px;
}

* { box-sizing: border-box; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.4; }
p { margin: 0 0 1em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px;
  height: 56px; display: flex; align-items: center; gap: 12px;
}
.logo { font-size: 18px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 6px 12px; border-radius: 999px; font-size: 15px;
  color: var(--muted); white-space: nowrap; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a.active { background: var(--brand); color: #fff; }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 20px 16px 56px; }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--muted); margin: 24px 0 12px;
}
.section-title::before {
  content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--brand);
}
.section-title span { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--faint); }

/* 首页精选 */
.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fcard {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #fff; transition: transform .15s, box-shadow .15s;
}
.fcard:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.07); }
.fcard .thumb { aspect-ratio: 16 / 9; background: var(--bg-soft) center / cover no-repeat; }
.fcard .cap {
  padding: 8px 10px 10px; font-size: 14px; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 图文网格 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gcard {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #fff; transition: transform .15s, box-shadow .15s;
}
.gcard:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.07); }
.gcard .thumb { aspect-ratio: 1 / 1; background: var(--bg-soft) center / cover no-repeat; }
.gcard .cap {
  padding: 8px 10px 4px; font-size: 15px; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gcard .meta { padding: 0 10px 10px; font-size: 12px; color: var(--faint); }

/* 文字流 */
.list { display: flex; flex-direction: column; }
.titem { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
.titem:last-child { border-bottom: none; }
.titem:hover .titem-title { color: var(--brand); }
.titem-title { font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; transition: color .15s; }
.titem-sum {
  font-size: 14px; color: var(--muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.titem-meta { margin-top: 8px; font-size: 12px; color: var(--faint); display: flex; gap: 12px; }
.tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px;
  background: var(--brand-soft); color: var(--brand); font-weight: 600; vertical-align: 1px;
}

/* 详情 */
.article { padding-top: 4px; }
.article h1 { font-size: 24px; line-height: 1.45; margin-bottom: 10px; }
.article .meta {
  font-size: 13px; color: var(--faint); display: flex; gap: 14px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.article .body { font-size: 17px; line-height: 1.85; }
.article .body p { margin: 0 0 1.1em; }
.article .imgcap { white-space: pre-line; }
.article .figure { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.summary-box {
  background: var(--bg-soft); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0;
  padding: 10px 14px; font-size: 15px; color: var(--muted); margin-bottom: 20px;
}
/* 返回按钮：居中胶囊，悬停品牌色淡底 */
.back {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; margin-top: 22px; padding: 13px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--muted); background: #fff;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.back:hover {
  border-color: var(--brand); color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 4px 14px rgba(255,107,53,.12);
}

/* 详情页 上一条/下一条 */
.detail-nav { display: flex; gap: 10px; margin-top: 28px; }
.detail-nav .dn-prev, .detail-nav .dn-next { flex: 1 1 0; min-width: 0; }
.detail-nav a {
  display: flex; flex-direction: column; gap: 4px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft);
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.detail-nav a:hover {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 6px 18px rgba(255,107,53,.14); transform: translateY(-1px);
}
.detail-nav .dn-prev { text-align: left; align-items: flex-start; }
.detail-nav .dn-next { text-align: right; align-items: flex-end; }
.detail-nav .dn-label { font-size: 12px; font-weight: 600; color: var(--brand); letter-spacing: .3px; }
.detail-nav .dn-title {
  font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.detail-nav a:hover .dn-title { color: var(--brand); }
.detail-nav .disabled {
  display: flex; flex-direction: column; gap: 4px; padding: 13px 14px;
  border: 1px dashed var(--line); border-radius: var(--radius); background: #fff;
}
.detail-nav .disabled .dn-label { color: var(--faint); font-weight: 600; }
.detail-nav .disabled .dn-title { color: var(--faint); font-weight: 400; }

/* 分页 */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 14px; color: var(--muted); border: 1px solid var(--line);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .disabled { opacity: .4; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 24px; padding: 24px 16px 32px;
  text-align: center; font-size: 13px; color: var(--faint);
}
.site-footer .inner { max-width: var(--maxw); margin: 0 auto; }

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

/* 404 */
.notfound { text-align: center; padding: 72px 16px; }
.notfound .code { font-size: 64px; font-weight: 800; color: var(--brand); line-height: 1; }
.notfound .msg { margin: 12px 0 24px; color: var(--muted); }

/* 响应式 */
@media (max-width: 640px) {
  .featured { grid-template-columns: 1fr; }
  .fcard { display: flex; align-items: center; }
  .fcard .thumb { width: 128px; flex: 0 0 128px; aspect-ratio: 4 / 3; }
  .fcard .cap { flex: 1; font-size: 15px; padding: 10px 12px; }
  .article h1 { font-size: 21px; }
  .article .body { font-size: 16.5px; }
  .wrap { padding: 16px 14px 48px; }
}
@media (min-width: 641px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
