/* AI 简讯 · mobile-first 响应式（单一断点 768px） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f6f7f4;
  --card: #ffffff;
  --ink: #26261f;
  --muted: #8a8a80;
  --line: #e4e4dc;
  --brand: #0f6e56;
  --brand-ink: #085041;
  --brand-bg: #e1f5ee;
  --danger: #a32d2d;
  --radius: 14px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
h1,h2,h3 { font-weight: 600; line-height: 1.4; }
h2 { font-size: 17px; margin-bottom: 10px; }
h3 { font-size: 15px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: 13px; }
.page-h { font-size: 20px; margin: 18px 0 14px; }

/* 顶栏 */
.topbar { background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; gap: 14px;
  height: 52px; }
.logo { font-weight: 700; font-size: 17px; color: var(--ink); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.nav a.on { color: var(--brand-ink); background: var(--brand-bg); }
.whoami { font-size: 13px; color: var(--muted); max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main.wrap { padding-top: 16px; padding-bottom: 40px; }
.foot { padding: 20px 16px 32px; color: var(--muted); font-size: 12px; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.gate h2 { margin-bottom: 6px; }

/* 表单 */
.row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.row input, .row select {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 16px;
  background: #fff; color: var(--ink); }
.row input.wide { width: 100%; flex-basis: 100%; }
textarea { width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 16px; font-family: inherit;
  resize: vertical; background: #fff; }

/* 按钮（触控目标 ≥44px） */
.btn { display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 15px; cursor: pointer; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ghost { background: transparent; }
.btn:active { transform: scale(.98); }
.btn-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.mini { min-height: 34px; padding: 0 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  cursor: pointer; }

/* 首页 hero */
.hero .hero-stats { display: flex; gap: 16px; margin-top: 8px;
  font-size: 13px; color: var(--muted); }
.hero-stats b { color: var(--brand-ink); }

/* 简讯卡片 */
.feed { display: flex; flex-direction: column; }
.brief-card { display: block; color: var(--ink); margin-bottom: 12px;
  transition: border-color .15s; }
.brief-card:active { border-color: var(--brand); }
.brief-head { display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 8px; gap: 8px; }
.topic-chip { background: var(--brand-bg); color: var(--brand-ink);
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  white-space: nowrap; }
.src { font-size: 12px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.brief-title { font-size: 17px; margin-bottom: 6px; font-weight: 600; }
.brief-sum { font-size: 14px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: #f1efe8; color: #5f5e5a; }
.go { margin-top: 12px; font-size: 14px; color: var(--brand);
  font-weight: 500; }
.load-more-wrap { text-align: center; margin: 6px 0 20px; }

/* 反馈流程 */
.steps { display: flex; gap: 4px; justify-content: space-between;
  font-size: 12px; color: var(--muted); padding: 12px 14px; }
.step.on { color: var(--brand-ink); font-weight: 600; }
.brief-h2 { font-size: 19px; margin-bottom: 4px; }
.content { margin: 10px 0; font-size: 15px; }
.content-full { font-size: 14px; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; }
.interest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.interest-btn { min-height: 64px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-size: 16px; cursor: pointer; }
.interest-btn.sel { border-color: var(--brand); background: var(--brand-bg);
  color: var(--brand-ink); font-weight: 600; }
.interest-btn.danger.sel { border-color: var(--danger); background: #fcebeb;
  color: var(--danger); }
.edit-tags .tag { cursor: pointer; min-height: 34px; display: inline-flex;
  align-items: center; user-select: none; font-size: 14px; }
.edit-tags .tag.off { background: #fff; color: #c5c5bc;
  text-decoration: line-through; border: 1px solid var(--line); }
#receipt-body { font-size: 15px; }
#receipt-body .resp { background: var(--brand-bg); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; color: var(--brand-ink); }
#receipt-body .cal { color: var(--muted); font-size: 14px; }

/* 画像页 */
.weights { display: flex; flex-direction: column; gap: 8px; }
.wrow { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.wrow .wname { width: 64px; color: var(--muted); text-align: right;
  flex-shrink: 0; }
.wrow .wbar { height: 10px; border-radius: 5px; background: var(--brand);
  min-width: 2px; }
.wrow .wval { color: var(--muted); }
.sketch { font-family: inherit; font-size: 14px; white-space: pre-wrap;
  background: #f8f8f3; border-radius: 10px; padding: 14px; }
.dis-item { display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed var(--line); font-size: 14px; }
.dis-item:last-child { border-bottom: none; }
.dis-item .n { color: var(--danger); font-weight: 600; }

/* 后台 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 14px; }
.stat { text-align: center; padding: 14px 8px; }
.stat b { display: block; font-size: 24px; color: var(--brand-ink); }
.stat span { font-size: 12px; color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500;
  padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px dashed var(--line);
  vertical-align: top; }
.ai-box { background: #f8f8f3; border-radius: 10px; padding: 14px;
  margin-bottom: 14px; }
.ai-box h3 { margin-bottom: 8px; }
.ai-box textarea { margin-bottom: 8px; }
code { background: #f1efe8; padding: 2px 6px; border-radius: 6px;
  font-size: 13px; }

/* ===== PC ≥768px 增强 ===== */
@media (min-width: 768px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 24px; }
  .brief-card:hover { border-color: var(--brand); }
  .interest-grid { grid-template-columns: repeat(4, 1fr); }
  .btn:hover { opacity: .9; }
}

/* ---- 登录与账号体系 ---- */
.login-card { max-width: 420px; margin: 48px auto; }
.login-card .row input { width: 100%; flex-basis: 100%; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px;
  color: var(--muted); margin-bottom: 12px; min-height: 44px; }
.remember input { width: 18px; height: 18px; }
.wide-btn { width: 100%; }
.logout-link { color: var(--muted); margin-left: 8px; font-size: 12px; }
.whoami { display: flex; align-items: center; }

/* ---- 管理按钮 ---- */
.btn.mini { min-height: 30px; padding: 2px 10px; font-size: 12px;
  margin: 2px 2px; cursor: pointer; border-radius: 8px; }
.btn.danger, button.danger { color: #fff; background: var(--danger);
  border: none; }
.ops { white-space: nowrap; }

/* 只读徽标 */
#readonly-badge { margin-top: 6px; color: var(--danger); }
