/* ==========================================================================
   精益进化系统 · Lean Evolution System — 视觉系统 v23
   设计方向：iOS 原生质感 × Linear 精密
   - 层次靠"极浅描边 + 双层柔影"，不靠粗边框
   - 大面积中性底 + 单点强调色（品牌深蓝 / 金）
   - 顶栏、抽屉、底部输入栏统一毛玻璃
   - 圆角分三级：18 卡片 / 12 控件 / 999 胶囊
   - 动效克制：只做位移与透明度，时长 150–260ms
   ⚠️ 布局骨架（flex/grid/断点/sticky/margin auto）与类名契约全部保留，勿删
   ========================================================================== */

:root {
  /* 品牌 */
  --primary: #1b3a6b;
  --primary-deep: #122a52;
  --primary-soft: #eef3fb;
  --gold: #c19a4b;
  --gold-soft: #fbf5e8;

  /* 语义 */
  --danger: #c43f3f;
  --danger-soft: #fdf1f1;
  --warn: #b8790c;
  --warn-soft: #fdf6e7;
  --ok: #0f7a52;
  --ok-soft: #eef8f3;

  /* 中性 */
  --ink: #171d26;
  --ink-2: #49535f;
  --ink-3: #8a94a3;
  --line: #e7eaf0;
  --line-soft: #f1f4f8;
  --bg: #f6f7f9;
  --card: #ffffff;

  /* 形状与光影 */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-2: 0 2px 4px rgba(16, 24, 40, .04), 0 12px 28px rgba(16, 24, 40, .07);
  --shadow-3: 0 8px 18px rgba(16, 24, 40, .07), 0 24px 56px rgba(16, 24, 40, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* 兼容旧变量名 */
  --gray: var(--ink-3);
  --text: var(--ink);
  --primary-light: var(--primary-soft);
  --gold-light: var(--gold-soft);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#app-view { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#app-view > main { flex: 1 0 auto; width: 100%; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: manipulation; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; }

/* ========================= 登录页 ========================= */

.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: stretch; }

.login-hero {
  flex: 1.15;
  background:
    radial-gradient(120% 80% at 85% 12%, rgba(193, 154, 75, .22), transparent 60%),
    radial-gradient(90% 70% at 10% 100%, rgba(43, 82, 151, .55), transparent 62%),
    linear-gradient(160deg, #0b1c38 0%, #16325e 52%, #1e4276 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 7% 150px;
  position: relative;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -140px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 154, 75, .28), transparent 68%);
}
/* 极细网格纹理，替代纯色平铺，屏幕上有质感但不抢内容 */
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 60% at 30% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 60% at 30% 30%, #000, transparent 75%);
  pointer-events: none;
}
.hero-building { position: absolute; bottom: 18px; right: 5%; width: min(56%, 420px); opacity: .42; z-index: 0; pointer-events: none; filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .38)); }
.login-hero > .hero-brand, .login-hero > h1, .login-hero > .hero-slogan, .login-hero > .hero-sub, .login-hero > .hero-deco { position: relative; z-index: 1; }

.hero-brand { font-size: 12px; letter-spacing: 5px; color: rgba(232, 205, 148, .92); margin-bottom: 26px; text-transform: uppercase; }
.hero-brand b { font-weight: 700; }
.login-hero h1 { font-size: 52px; letter-spacing: 12px; margin-bottom: 20px; font-weight: 700; line-height: 1.08; }
.hero-slogan { font-size: 15px; letter-spacing: 3px; color: var(--gold); margin-bottom: 12px; font-weight: 500; }
.hero-sub { font-size: 13px; color: rgba(255, 255, 255, .66); line-height: 1.85; }
.hero-deco { margin-top: 34px; width: 72px; height: 3px; background: linear-gradient(90deg, var(--gold), rgba(193, 154, 75, .12)); border-radius: 2px; }

.login-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
  padding: 48px 24px;
  position: relative;
}
.login-card > * { width: min(360px, 100%); }
.login-logo { width: 248px; height: auto; margin-bottom: 28px; align-self: center; }
.login-card h2 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 24px;
  padding-left: 12px;
  border-left: 3px solid var(--gold);
  letter-spacing: 2px;
  font-weight: 600;
}
#login-form input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 15px;
  background: #fbfcfd;
  color: var(--ink);
  transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
#login-form input::placeholder { color: #a9b2bf; }
#login-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(27, 58, 107, .09);
}
.login-error { color: var(--danger); font-size: 13px; margin-top: 8px; line-height: 1.5; }
.login-tip { color: var(--ink-3); font-size: 12px; margin-top: 20px; text-align: center; line-height: 1.6; }
.login-alt { margin-top: 6px; text-align: center; }
.login-alt button { border: none; background: none; color: var(--primary); font-size: 13px; padding: 10px 12px; font-family: inherit; font-weight: 500; }

/* ========================= 顶栏 ========================= */

.topbar {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(16, 24, 40, .07);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  min-height: 62px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.menu-btn { display: none; }
#drawer { display: none; }
.brand { font-weight: 700; font-size: 16px; color: var(--ink); white-space: nowrap; display: flex; align-items: center; gap: 11px; padding-right: 18px; border-right: 1px solid var(--line); letter-spacing: -.01em; }
.brand-logo { height: 34px; width: auto; }
.brand-mark { background: linear-gradient(160deg, var(--primary), #2b5297); color: var(--gold); width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.brand-en { font-size: 10.5px; color: var(--ink-3); font-weight: 500; margin-left: 1px; letter-spacing: .06em; text-transform: uppercase; }

.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: none;
  background: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  font-weight: 500;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.tabs button:hover { background: var(--line-soft); color: var(--ink); }
.tabs button.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(27, 58, 107, .22); }

.user-box { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user-meta { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.user-meta #user-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-meta #user-dept { font-size: 11px; color: var(--ink-3); }

main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
.app-footer { text-align: center; color: var(--ink-3); font-size: 12px; padding: 20px 16px calc(30px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); line-height: 1.7; }

/* ========================= 页面标题 ========================= */

.wall-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.wall-title h2 {
  font-size: 21px;
  position: relative;
  padding-left: 13px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
}
.wall-title h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--gold));
}
.wall-title p { color: var(--ink-3); font-size: 13px; margin-top: 6px; line-height: 1.5; }

/* ========================= 筛选 ========================= */

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; align-items: center; }
.chip-group { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: #ccd5e2; background: #fdfefe; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(27, 58, 107, .2); }

/* ========================= 按钮 ========================= */

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 17px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .14s var(--ease), box-shadow .18s var(--ease), opacity .14s var(--ease), background .18s var(--ease);
}
.btn-primary {
  background: linear-gradient(180deg, #26497f, var(--primary));
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .14), 0 6px 16px rgba(27, 58, 107, .22);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 2px 4px rgba(16, 24, 40, .14), 0 10px 22px rgba(27, 58, 107, .26); }
.btn-primary:active { transform: scale(.985); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #ccd5e2; background: #fbfcfe; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fbe6e6; }

/* ========================= 卡片列表 ========================= */

.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.post-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: #dde3ec; }
.post-card:active { transform: scale(.995); background: #fcfdff; }

.card-badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* 徽章：低饱和底 + 细描边，比纯色块更克制 */
.badge {
  font-size: 11px;
  padding: 2.5px 9px;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-cat { background: #f2f4f8; color: #566274; }
.badge-safety { background: var(--danger-soft); color: var(--danger); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(196, 63, 63, .16); }
.badge-open { background: var(--danger-soft); color: var(--danger); }
.badge-processing { background: var(--warn-soft); color: var(--warn); }
.badge-improved, .badge-adopted { background: var(--primary-soft); color: var(--primary); }
.badge-closed { background: #f2f4f7; color: #7d8794; }
.badge-featured { background: var(--gold-soft); color: #96702a; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(193, 154, 75, .22); }
.badge-overdue { background: #b3261e; color: #fff; font-weight: 600; animation: pulse 2s infinite; }
.badge-event { background: #eaf1fd; color: #1c4f9c; }
.badge-pinned { background: linear-gradient(160deg, #26497f, var(--primary)); color: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(27, 58, 107, .3); }
.badge-focus { background: #fdf0e3; color: #a8470c; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(168, 71, 12, .14); }
.badge-replied { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }

.post-card h3 { font-size: 15.5px; line-height: 1.42; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.post-card .content {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.card-thumb { width: 100%; height: 132px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.card-thumb-count { font-size: 11px; color: var(--ink-3); align-self: flex-start; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: auto;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.card-meta .spacer { flex: 1; }
.card-target { font-size: 12px; color: var(--primary); background: var(--primary-soft); border-radius: 9px; padding: 5px 9px; line-height: 1.45; }

/* ========================= 面板 ========================= */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.panel-head h3 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }

.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f7f8fa; padding: 2px; gap: 2px; }
.seg button { border: none; background: none; padding: 5px 13px; font-size: 13px; color: var(--ink-2); border-radius: 8px; font-weight: 500; transition: all .15s var(--ease); }
.seg button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-1); font-weight: 600; }

/* ========================= 榜样墙 ========================= */

.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.board-col { min-width: 0; }
.lb-row { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.lb-row:last-child { border-bottom: none; }
.lb-rank {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #f1f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #6b7684;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.lb-rank.top1 { background: linear-gradient(160deg, #f4dc9c, var(--gold)); color: #5a4100; box-shadow: 0 2px 6px rgba(193, 154, 75, .35); }
.lb-rank.top2 { background: linear-gradient(160deg, #eef1f5, #dbe0e7); color: #55606e; }
.lb-rank.top3 { background: linear-gradient(160deg, #f3d7bd, #e6bd97); color: #70431a; }
.lb-name { font-weight: 600; color: var(--ink); }
.lb-dept { color: var(--ink-3); font-size: 12px; flex: 1; }
.lb-points { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }

.dept-row { margin-bottom: 13px; }
.dept-row .dept-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; color: var(--ink-2); }
.dept-bar { height: 7px; background: #f0f3f7; border-radius: 999px; overflow: hidden; }
.dept-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 999px; }

/* ========================= 我的 ========================= */

.mine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.points-total { font-size: 30px; font-weight: 700; color: var(--primary); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.pe-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.pe-row:last-child { border-bottom: none; }
.pe-reason { color: var(--ink-2); }
.pe-time { color: var(--ink-3); font-size: 12px; }
.pe-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.pe-delta.plus { color: var(--ok); }
.pe-delta.minus { color: var(--danger); }

.reward-panel { background: linear-gradient(150deg, #fff 42%, var(--gold-soft)); }
.reward-intro { font-size: 13px; color: var(--ink-2); line-height: 1.75; margin-bottom: 13px; }
.tier-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.tier-row:last-child { border-bottom: none; }
.tier-pts { font-weight: 700; color: var(--primary); width: 58px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.tier-bar { flex: 1; height: 7px; background: #f0f3f7; border-radius: 999px; overflow: hidden; }
.tier-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 999px; transition: width .5s var(--ease); }
.tier-reward { flex-shrink: 0; color: var(--ink-2); }
.star-tag { margin-left: 6px; }
.reward-now { font-size: 14px; margin-bottom: 12px; color: var(--ink-2); }
.prog-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prog-bar { height: 9px; background: #f0f3f7; border-radius: 999px; overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--primary)); border-radius: 999px; transition: width .5s var(--ease); }

/* 积分规则表（v15 新增） */
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rule-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; background: #f8fafc; border-radius: 10px; font-size: 13px; border: 1px solid var(--line-soft); }
.rule-name { color: var(--ink-2); min-width: 0; }
.rule-val { font-weight: 700; color: var(--primary); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rule-val.zero { color: var(--ink-3); }
.rule-note { margin-top: 11px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.rule-caps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.rule-cap { font-size: 11.5px; color: var(--ink-3); background: #f6f8fb; border-radius: 7px; padding: 4px 8px; font-variant-numeric: tabular-nums; }

/* ========================= 表格 ========================= */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#user-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#user-table th, #user-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
#user-table th { color: var(--ink-3); font-weight: 500; font-size: 12px; }
#user-table tr:last-child td { border-bottom: none; }

/* ========================= 弹窗 ========================= */

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(12, 22, 40, .46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: 440px;
  max-width: 100%;
  position: relative;
  box-shadow: var(--shadow-3);
}
.modal-box h3 { font-size: 17px; margin-bottom: 15px; padding-right: 34px; line-height: 1.4; font-weight: 650; letter-spacing: -.01em; }
.modal-lg { width: 680px; }
.modal-close { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 24px; color: var(--ink-3); line-height: 1; }

.notice-item { margin-bottom: 16px; }
.notice-item:last-child { margin-bottom: 0; }
.notice-item h4 { font-size: 14px; color: var(--primary); margin-bottom: 6px; font-weight: 650; }
.notice-item p { font-size: 13px; line-height: 1.8; color: var(--ink-2); margin-bottom: 6px; }
.notice-item p:last-child { margin-bottom: 0; }

/* ========================= 表单 ========================= */

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfcfd;
  color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(27, 58, 107, .08); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 14px; color: var(--ink-2); }
.compose-hint { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; line-height: 1.6; }
.upload-btn {
  display: inline-block;
  border: 1px dashed #b9c6da;
  color: var(--primary);
  background: #f7fafd;
  border-radius: var(--radius-sm);
  padding: 9px 17px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: all .16s var(--ease);
}
.upload-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.preview { position: relative; width: 76px; height: 76px; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview .rm { position: absolute; top: 0; right: 0; width: 21px; height: 21px; border: none; background: rgba(0, 0, 0, .58); color: #fff; font-size: 12px; line-height: 21px; padding: 0; }

/* ========================= 详情 ========================= */

.detail-head { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; padding-right: 24px; }
.detail-title { font-size: 19px; margin-bottom: 11px; line-height: 1.42; font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
.detail-content { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; margin-bottom: 14px; }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 13px; }
.detail-gallery img { width: 100%; height: 112px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); cursor: zoom-in; }
.detail-meta { display: flex; align-items: center; gap: 13px; font-size: 12px; color: var(--ink-3); margin-bottom: 14px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); align-items: center; }
.featured-reason { background: var(--gold-soft); border-radius: var(--radius-sm); padding: 9px 13px; font-size: 13px; color: #86601a; margin-bottom: 13px; line-height: 1.6; }
.section-title { font-size: 14px; font-weight: 700; margin: 18px 0 11px; color: var(--ink); letter-spacing: -.005em; }

.solution-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; margin-bottom: 10px; background: #fff; }
.solution-card.adopted { border-color: #c4d4ea; background: #f7fafd; }
.solution-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; flex-wrap: wrap; }
.solution-author { font-weight: 600; color: var(--ink); }
.solution-content { font-size: 13px; color: var(--ink-2); line-height: 1.65; white-space: pre-wrap; }
.solution-images { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.solution-images img { width: 82px; height: 82px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }

.comment-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: linear-gradient(160deg, #eef3fb, #e3ebf7);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment-meta .c-author { font-weight: 600; color: var(--ink-2); }
.comment-text { font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; color: var(--ink); }
.comment-foot { display: flex; gap: 14px; margin-top: 5px; }
.icon-btn { border: none; background: none; font-size: 12px; color: var(--ink-3); padding: 0; transition: color .15s var(--ease); }
.icon-btn:hover { color: var(--ink-2); }
.icon-btn.liked { color: var(--danger); }
.comment-form { margin-top: 13px; }
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  background: #fbfcfd;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.comment-form textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(27, 58, 107, .08); }
.comment-form-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.anon-toggle { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.status-select { padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; background: #fff; color: var(--ink-2); }
.empty { text-align: center; color: var(--ink-3); font-size: 13px; padding: 36px 0; line-height: 1.7; }

/* ========================= 浮层 ========================= */

.toast {
  position: fixed;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(23, 29, 38, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 11px 21px;
  border-radius: 13px;
  font-size: 13.5px;
  z-index: 400;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .26);
  max-width: 88vw;
  text-align: center;
  line-height: 1.5;
  animation: toastIn .22s var(--ease);
}
.toast.err { background: rgba(196, 63, 63, .96); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.lightbox { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .94); z-index: 300; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

.dialog-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(12, 22, 40, .46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dialog { background: #fff; border-radius: 18px; width: 400px; max-width: 100%; padding: 20px 19px 17px; box-shadow: var(--shadow-3); }
.dialog h4 { font-size: 15.5px; margin-bottom: 11px; line-height: 1.45; font-weight: 650; }
.dialog input, .dialog textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  background: #fbfcfd;
  color: var(--ink);
}
.dialog input:focus, .dialog textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(27, 58, 107, .08); }
.dialog select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font-size: 14px; margin-bottom: 10px; font-family: inherit; background: #fbfcfd; }
.dialog select:focus { outline: none; border-color: var(--primary); }
.dialog-foot { display: flex; gap: 10px; margin-top: 15px; }
.dialog-foot .btn { flex: 1; padding: 11px 0; }
.dialog-hint { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-bottom: 10px; }

/* ========================= 附议 / 回应 / 治理 ========================= */

.support-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 500;
  transition: all .16s var(--ease);
}
.support-btn:hover { border-color: #ccd5e2; background: #fbfcfe; }
.support-btn b { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.support-btn.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.support-tip { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.support-tip.focus { color: #a8470c; font-weight: 600; }

.reply-box { border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; margin-bottom: 14px; background: #fafbfc; }
.reply-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.reply-tag { font-size: 12px; font-weight: 700; color: var(--primary); }
.reply-by { font-size: 11.5px; color: var(--ink-3); }
.reply-text { font-size: 13px; line-height: 1.72; color: var(--ink-2); white-space: pre-wrap; }
.reply-btn { margin-top: 10px; }
.reply-edit { margin-top: 8px; color: var(--primary); font-size: 12px; }
.reply-done { background: #f7fafd; border-color: #ccdcf0; }
.reply-wait { background: #fffcf5; border-color: #f0e2c4; }
.reply-wait .reply-tag { color: var(--warn); }
.reply-late { background: var(--danger-soft); border-color: #f0cccc; }
.reply-late .reply-tag { color: var(--danger); }

.gov-panel { background: linear-gradient(150deg, #fff 46%, #eff4fb); }
.gov-grid { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.gov-rate { flex: 0 0 auto; min-width: 104px; text-align: center; padding-right: 20px; border-right: 1px solid var(--line); }
.gov-num { font-size: 36px; font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.gov-num i { font-size: 15px; font-style: normal; margin-left: 1px; }
.gov-cap { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.gov-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; flex: 1; min-width: 0; }
.gov-stat { min-width: 0; }
.gov-v { font-size: 18px; font-weight: 700; line-height: 1.3; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.gov-v.warn { color: var(--danger); }
.gov-k { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.gov-bar { height: 7px; background: #edf1f6; border-radius: 999px; overflow: hidden; margin-bottom: 13px; }
.gov-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 999px; transition: width .6s var(--ease); }
.gov-types { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 11px; font-size: 12px; color: var(--ink-2); }
.gov-type { display: inline-flex; align-items: center; gap: 5px; }
.gov-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.gov-dot.adopted { background: var(--ok); }
.gov-dot.planning { background: var(--primary); }
.gov-dot.declined { background: var(--ink-3); }
.gov-dot.need_info { background: var(--warn); }
.gov-note { font-size: 12px; color: var(--ink-3); line-height: 1.75; }
.gov-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gov-form .field { margin-bottom: 8px; }

/* ========================= 注册审批 ========================= */

.reg-row { align-items: center; flex-wrap: wrap; row-gap: 8px; padding: 11px 0; }
.reg-actions { display: flex; gap: 8px; flex-shrink: 0; margin-left: auto; }
.reg-count { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 400; color: #fff; background: var(--danger); border-radius: 10px; padding: 1px 8px; vertical-align: middle; }

.post-card:active { background: #fcfdff; }
.btn:active, .chip:active, .seg button:active, .icon-btn:active { opacity: .72; }
#reward-tiers { line-height: 1.6; }

/* ========================= 响应式 ========================= */

@media (max-width: 860px) {
  .login-wrap { flex-direction: column; }
  .login-hero { flex: 1 1 auto; padding: calc(34px + env(safe-area-inset-top, 0px)) 22px 62px; }
  .hero-brand { font-size: 11px; letter-spacing: 3px; margin-bottom: 16px; }
  .login-hero h1 { font-size: 30px; letter-spacing: 8px; margin-bottom: 14px; }
  .hero-slogan { font-size: 13px; letter-spacing: 1.5px; white-space: nowrap; margin-bottom: 10px; }
  .hero-sub { font-size: 12px; }
  .hero-deco { margin-top: 18px; width: 56px; height: 3px; }
  .hero-building { width: 200px; right: 10px; bottom: 10px; opacity: .34; }
  .login-logo { width: 148px; margin-bottom: 14px; }
  .login-card { flex: 0 0 auto; justify-content: flex-start; padding: 24px 20px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .login-card h2 { font-size: 17px; margin-bottom: 16px; }
  #login-form input { padding: 13px 14px; margin-bottom: 11px; }
  .login-tip { margin-top: 14px; font-size: 11px; }
}

@media (max-width: 760px) {
  .topbar {
    position: sticky;
    top: 0;
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px 8px;
    gap: 0;
    min-height: 54px;
    align-items: center;
  }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); border-right: none; padding: 0; gap: 0; }
  .brand-logo { height: 34px; }
  .brand-text, .brand-en { display: none; }
  .user-box { display: none; }
  .tabs { display: none; }
  .user-meta { display: none; }
  .board-grid, .mine-grid { grid-template-columns: 1fr; }
  .card-list { grid-template-columns: 1fr; }
  .wall-head { flex-direction: column; }
  .wall-head .btn-primary { width: 100%; padding: 13px; }
  main { padding: 15px 12px calc(30px + env(safe-area-inset-bottom, 0px)); }
  .filter-bar { flex-direction: column; align-items: stretch; gap: 9px; }
  .chip-group { flex-wrap: wrap; row-gap: 8px; width: 100%; max-width: 100%; min-width: 0; }
  .chip { white-space: nowrap; flex-shrink: 0; padding: 5px 11px; font-size: 12.5px; }
  #discover-event { width: 100%; padding: 10px 11px; }
  .card-meta { flex-wrap: wrap; row-gap: 2px; }
  .lb-row { flex-wrap: wrap; row-gap: 2px; }
  .lb-dept { display: none; }
  .tier-row { flex-wrap: wrap; row-gap: 4px; }
  .tier-bar { flex-basis: 100%; order: 3; }
  .tier-pts { width: auto; }
  .rule-grid { grid-template-columns: 1fr; }
  .modal { display: block; padding: 0; }
  .modal-box { width: 100%; min-height: 100%; border-radius: 0; padding: 52px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: none; }
  #detail-body { min-height: calc(100vh - 70px); min-height: calc(100dvh - 70px); display: flex; flex-direction: column; min-width: 0; }
  .modal-close {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 12px;
    float: none;
    z-index: 5;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
  }
  .detail-gallery { grid-template-columns: repeat(2, 1fr); }
  .detail-gallery img { height: 132px; }
  .detail-title, .post-card h3 { word-break: break-word; }
  .event-actions .btn { flex: 1; }
  .solution-head { flex-wrap: wrap; }
  .comment-form-row { flex-wrap: wrap; row-gap: 8px; }
  .comment-form {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    margin: auto -16px calc(-18px - env(safe-area-inset-bottom, 0px));
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    z-index: 4;
  }
  .comment-form textarea { min-height: 72px; }
  .comment-form-row { margin-top: 8px; align-items: center; flex-wrap: nowrap; }
  .comment-form-row .btn { padding: 12px 28px; font-size: 15px; border-radius: var(--radius-sm); flex-shrink: 0; }
  .anon-toggle { flex: 1; }
  .toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 88vw; }
  .menu-btn { display: block; position: relative; z-index: 2; background: none; border: none; color: var(--ink); font-size: 21px; padding: 2px 10px 2px 0; line-height: 1; align-self: center; }
  #drawer-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(12, 22, 40, .42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 140; }
  #drawer {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 78%;
    max-width: 300px;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 150;
    transform: translateX(-105%);
    transition: transform .26s var(--ease);
    flex-direction: column;
    box-shadow: 6px 0 32px rgba(16, 24, 40, .14);
    overscroll-behavior: contain;
  }
  #drawer.open { transform: translateX(0); }
  .drawer-head { padding: calc(16px + env(safe-area-inset-top, 0px)) 18px 14px; border-bottom: 1px solid var(--line); background: transparent; }
  .drawer-logo { width: 160px; display: block; margin-bottom: 10px; }
  .drawer-user { display: flex; flex-direction: column; color: var(--ink); line-height: 1.5; }
  .drawer-user #drawer-name { font-weight: 700; font-size: 15px; color: var(--ink); }
  .drawer-user #drawer-dept { font-size: 12px; color: var(--ink-3); }
  .drawer-nav { flex: 1; padding: 10px 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .drawer-nav button { display: block; width: 100%; text-align: left; padding: 14px 20px; border: none; background: none; font-size: 15px; color: var(--ink-2); border-left: 3px solid transparent; font-weight: 500; }
  .drawer-nav button.active { background: var(--primary-soft); color: var(--primary); border-left-color: var(--gold); font-weight: 600; }
  .drawer-foot { border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .drawer-foot button { display: block; width: 100%; text-align: left; padding: 12px 14px; border: none; background: none; font-size: 14px; color: var(--ink-2); border-radius: 9px; }
  .drawer-foot button:active { background: var(--bg); }
  input, textarea, select { font-size: 16px !important; }
  .gov-grid { gap: 12px; }
  .gov-rate { width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 0 0 11px; border-right: none; border-bottom: 1px solid var(--line); }
  .gov-cap { margin-top: 0; }
  .gov-stats { grid-template-columns: repeat(2, 1fr); row-gap: 11px; }
  .gov-form { grid-template-columns: 1fr; }
  .support-tip { flex-basis: 100%; }
  .detail-actions .support-btn { padding: 8px 14px; }
}

@media (max-width: 400px) {
  .topbar { padding: max(8px, env(safe-area-inset-top, 0px)) 10px 8px; }
  .brand { font-size: 15px; gap: 6px; padding-right: 10px; }
  .brand-logo { height: 24px; }
  .user-box { gap: 6px; }
  .user-box .btn-sm { padding: 5px 8px; font-size: 12px; }
  .tabs button { padding: 7px 10px; font-size: 13px; }
  .login-hero h1 { font-size: 26px; letter-spacing: 6px; }
  .points-total { font-size: 26px; }
  .filter-bar { gap: 6px; }
  .chip-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 24px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  }
  .chip { padding: 4px 10px; font-size: 12px; }
  .wall-title h2 { font-size: 18.5px; }
}

@media (max-width: 380px) {
  #register-modal .modal-box { padding-top: 46px; }
  #register-form .field { margin-bottom: 10px; }
}

/* 详情页操作按钮：移动端可点区域最小 34px，避免误触与过小 */
.detail-actions .btn-sm,
.detail-actions .icon-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 尊重系统的"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   v15.1 移动端首屏密度优化
   1) 发帖按钮 → 右下角悬浮胶囊，把首屏让给内容
   2) 筛选区 3 行 → 2 行（分类一行横滑，状态与活动并排）
   ========================================================================== */
@media (max-width: 760px) {
  .wall-head { margin-bottom: 12px; }
  /* 悬浮发帖按钮：所有带「＋ 发…」按钮的页面自动生效 */
  .wall-head .btn-primary {
    position: fixed;
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: auto;
    padding: 13px 20px;
    border-radius: 999px;
    font-size: 14.5px;
    box-shadow: 0 4px 10px rgba(16, 24, 40, .16), 0 10px 26px rgba(27, 58, 107, .32);
  }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

  .filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }
  .filter-bar > .chip-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 2px;
    padding-right: 20px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent);
  }
  .filter-bar > .chip-group:nth-child(1) { grid-column: 1 / -1; }
  .filter-bar > .chip-group:nth-child(2) { grid-column: 1; }
  .filter-bar > .chip-group:nth-child(3) { grid-column: 2; padding-right: 0; -webkit-mask-image: none; mask-image: none; }
  #discover-event { width: auto; max-width: 116px; padding: 7px 9px; font-size: 12.5px; }
  .chip { padding: 6px 12px; font-size: 12.5px; }
}

/* v15.2 筛选行重排：第一行 分类+活动，第二行 状态独占整行 */
@media (max-width: 760px) {
  .filter-bar > .chip-group:nth-child(1) { grid-column: 1; }
  .filter-bar > .chip-group:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .filter-bar > .chip-group:nth-child(3) { grid-column: 2; grid-row: 1; }
  #discover-event { max-width: 104px; }
}

/* v15.3 活动筛选移到标题行：移动端省下一整行 */
@media (max-width: 760px) {
  .wall-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    row-gap: 10px;
  }
  .wall-head .wall-title { grid-column: 1; grid-row: 1; min-width: 0; }
  .wall-head #discover-event { grid-column: 2; grid-row: 1; margin-top: 1px; max-width: 112px; }
  .filter-bar { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
  .filter-bar > .chip-group { grid-column: auto !important; grid-row: auto !important; }
}

/* v15.4 积分规则：移动端两列，压缩纵向长度 */
@media (max-width: 760px) {
  .rule-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .rule-item { padding: 9px 10px; font-size: 12.5px; gap: 6px; }
  .rule-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rule-val { font-size: 13px; }
  .rule-cap { font-size: 11px; padding: 4px 7px; }
}

/* v15.5 积分规则表单：分组标题 + 移动端两列 */
.rule-section { grid-column: 1 / -1; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin: 4px 0 -2px; padding-top: 6px; }
.rule-section:first-child { padding-top: 0; margin-top: 0; }
@media (max-width: 760px) {
  #point-rules-form { grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 2px; }
  #point-rules-form .field { margin-bottom: 10px; }
  #point-rules-form .field span { font-size: 11.5px; line-height: 1.35; margin-bottom: 5px; }
  #point-rules-form input { padding: 9px 11px; }
}

/* v15.6 详情页操作区分层：主操作在前，管理操作独立成条 */
.admin-actions {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.admin-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.admin-actions .btn-sm { padding: 5px 11px; font-size: 12.5px; }
.detail-actions .icon-btn { font-weight: 500; }

/* v15.7 底部评论条改回不透明：半透明会让下方内容透出来，像文字重叠 */
@media (max-width: 760px) {
  .comment-form {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 -1px 0 var(--line), 0 -8px 20px rgba(16, 24, 40, .05);
  }
}

/* v23 项目改名「精益进化系统」：3 字标题的字距用在 6 字上会过散，
   letter-spacing 会在末字右侧也留一份空隙，使整行看起来偏左，用负 margin 抵消 */
.login-hero h1 { letter-spacing: 8px; margin-right: -8px; }
.brand-text { letter-spacing: -.02em; }
@media (max-width: 860px) {
  .login-hero h1 { letter-spacing: 4px; margin-right: -4px; }
}
@media (max-width: 400px) {
  .login-hero h1 { letter-spacing: 3px; margin-right: -3px; }
}
/* 顶栏品牌位由 3 字变 6 字共宽约 +46px：先摘掉英文副标，再把 tabs 的横向内距收 2px
   （仅在 tabs 真正会溢出的中窄屏生效，宽屏保持原样） */
@media (max-width: 1180px) and (min-width: 761px) {
  .brand-en { display: none; }
  .brand { padding-right: 12px; }
  .tabs button { padding: 9px 12px; }
}
