:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #18202b;
  --muted: #657083;
  --line: #dfe4ea;
  --brand: #145c52;
  --brand-2: #a63b2a;
  --soft: #eaf3f1;
  --danger: #b42318;
  --ok: #16794b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand { min-width: 0; }
.brand strong { display: block; font-size: 18px; }
.brand span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 8px; align-items: center; }
.nav a, .btn, button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
  cursor: pointer;
}
.btn-primary, button.primary { background: var(--brand); border-color: var(--brand); color: white; }
.btn-warn { background: var(--brand-2); border-color: var(--brand-2); color: white; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: white; }
.danger-panel { margin-top: 12px; border-color: #efb8b1; background: #fff7f6; }
.wrap { max-width: 920px; margin: 0 auto; padding: 14px; }
.notice {
  background: #fff8e7;
  border: 1px solid #efd99f;
  border-radius: 8px;
  padding: 10px 12px;
  color: #654b12;
  margin-bottom: 12px;
  font-size: 14px;
}
.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: white;
  font-size: 13px;
}
.tab.active { color: var(--brand); background: var(--soft); border-color: #bddad4; }
.post-list { display: grid; gap: 10px; }
.post-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}
.post-row, .user-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}
.user-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.post-title { font-weight: 750; font-size: 17px; margin: 0 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef1f4;
  padding: 3px 8px;
  font-size: 12px;
}
.pill.red { color: var(--danger); background: #fff0ee; }
.pill.green { color: var(--ok); background: #eaf7f0; }
.field-grid { display: grid; gap: 10px; }
.field-row { display: grid; gap: 6px; }
.field-group {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.field-group h3 { margin: 0; font-size: 15px; }
label { color: #303b49; font-size: 13px; font-weight: 650; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.evidence-grid a { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f0f2f4; }
.evidence-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.evidence-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: start;
}
.evidence-detail-grid a { background: white; }
.evidence-detail-grid img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.avatar {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.user-avatar {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff3d7;
}
.small-avatar {
  width: 46px;
  height: 46px;
}
.tiny-avatar {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}
.detail-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.content { white-space: pre-wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.compact-actions { margin-top: 8px; }
.replies-panel { margin-top: 12px; }
.reply-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.reply-item:first-of-type { border-top: 0; }
.reply-party {
  background: #f0faf4;
  border: 1px solid #b7dfc3;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
}
.reply-head { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.reply-body { margin-top: 6px; }
.reply-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.reply-empty { padding: 18px 8px; }
.reply-login { margin-top: 12px; margin-bottom: 0; }
.reporter-box {
  padding: 10px;
  border: 1px solid #bddad4;
  border-radius: 8px;
  background: var(--soft);
}
.reporter-title { font-weight: 750; margin-bottom: 8px; }
.reporter-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}
.upload-progress {
  display: none;
  gap: 8px;
  padding: 10px;
  border: 1px solid #bddad4;
  border-radius: 8px;
  background: var(--soft);
}
.upload-progress.active { display: grid; }
.upload-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}
.upload-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e6e3;
}
.upload-progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .15s ease;
}
button:disabled { opacity: .68; cursor: wait; }
.empty { text-align: center; color: var(--muted); padding: 32px 14px; }
.bottom-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  box-shadow: 0 10px 28px rgba(20, 92, 82, .28);
}
.table-list { display: grid; gap: 8px; }
.small { color: var(--muted); font-size: 12px; }
.status-pending { color: #9a6700; }
.status-published { color: var(--ok); }
.status-hidden { color: var(--danger); }
.status-bg-pending { background: #fff8dc; border-color: #ecd789; }
.status-bg-published { background: #ecf8ef; border-color: #b7dfc3; }
.status-bg-hidden { background: #fff0ee; border-color: #efb8b1; }

@media (max-width: 640px) {
  .topbar-inner { padding: 10px 12px; }
  .brand strong { font-size: 17px; }
  .nav a, .btn, button { padding: 8px 9px; font-size: 13px; }
  .wrap { padding: 12px; }
  .searchbar { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .evidence-detail-grid { grid-template-columns: 1fr; }
}
