@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --cream: #f8f4ed;
  --cream-2: #f0e8d7;
  --paper: #fffcf6;
  --ink: #2a2520;
  --ink-2: #6b5e51;
  --ink-3: #a89888;
  --line: #e6dcc6;
  --line-2: #efe6d3;
  --accent: #c2643a;
  --accent-2: #a44e25;
  --accent-soft: #f1d9c2;
  --gold: #c9a35e;
  --green: #6b8e5a;
  --red: #b04a3a;
  --photo-ratio: 3 / 4;
  --map-ratio: 4 / 3;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.page { min-height: 100vh; background: var(--cream); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-18 { gap: 18px; }
.gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-28 { gap: 28px; } .gap-32 { gap: 32px; }
.muted { color: var(--ink-2); }
.muted-2 { color: var(--ink-3); }
.bold { font-weight: 600; }
.tnum { font-variant-numeric: tabular-nums; }
.upper { text-transform: uppercase; letter-spacing: .6px; }
.tag-num { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .4px; }
.spacer { flex: 1; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav.dense { padding: 14px 32px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 19px; font-weight: 600; letter-spacing: .5px;
  cursor: pointer;
}
.brand-mark {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--ink-2); }
.nav-links a.active { color: var(--accent); font-weight: 500; }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.foot {
  border-top: 1px solid var(--line);
  padding: 24px 40px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex; gap: 16px; align-items: center;
  background: var(--cream);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px;
  border-radius: 4px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--cream-2); }
.btn.solid { background: var(--ink); color: var(--cream); }
.btn.tiny { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 3px; }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; letter-spacing: .4px;
  padding: 3px 9px; border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2);
  font-weight: 500;
}
.pill.urgent { background: #fbe7e1; color: var(--red); border-color: #f3cfc4; }
.pill.accent { background: var(--accent-soft); color: var(--accent-2); border-color: #ebc5a4; }
.pill.success { background: #e0ead7; color: #486939; border-color: #c9d8b8; }
.pill.gold { background: #f7eccd; color: #846530; border-color: #e6d29b; }
.pill.ghost { background: transparent; }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }

.ph {
  background: repeating-linear-gradient(135deg, #d8cfbd 0 8px, #d0c6b1 8px 16px);
  color: #6b5e51; font-family: var(--mono); font-size: 11px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 4px; overflow: hidden; position: relative;
}
.ph.portrait::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 40% at center 38%, rgba(255,250,240,.35), transparent 70%);
}
.ph > span {
  position: relative; z-index: 1;
  opacity: .78; padding: 4px 8px;
  background: rgba(248,244,237,.72); border-radius: 2px;
}
.real-photo {
  display: block;
  object-fit: cover;
  background: var(--cream-2);
  border-radius: 4px;
}
.upload-tile {
  position: relative;
  flex: 1 1 140px;
  min-height: 0;
  aspect-ratio: var(--photo-ratio);
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
}
.upload-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-tile .ph,
.upload-tile .real-photo {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: var(--photo-ratio);
  border-radius: 0;
  object-fit: cover;
}
.upload-tile[style*="min-height"] { min-height: 0 !important; }
.upload-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.upload-section-head .title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.upload-section-head .hint {
  color: var(--ink-3);
  font-size: 12px;
}
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: start;
}
.photo-upload-card {
  min-width: 0;
}
.photo-upload-caption {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}
.photo-upload-caption b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.photo-upload-caption span {
  display: block;
  color: var(--ink-3);
  margin-top: 2px;
}
.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}
.photo-strip .real-photo,
.photo-strip .ph {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
}
.detail-photo-strip {
  grid-template-columns: repeat(auto-fill, minmax(148px, 180px));
  justify-content: center;
}
.detail-photo-strip .card {
  width: 100%;
}
.ai-watermark {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(248,244,237,.9);
  color: var(--accent);
  font: 10px var(--mono);
  text-align: center;
  padding: 4px 6px;
  border-radius: 2px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field label .req { color: var(--accent); margin-left: 2px; }
.field input, .field textarea, .field select {
  color: var(--ink); padding: 10px 12px; border: 1px solid var(--line);
  background: var(--paper); border-radius: 4px; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { min-height: 70px; resize: vertical; }
.field .hint { font-size: 11px; color: var(--ink-3); }

.scene-location-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(320px, .95fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 14px;
}
.scene-location-fields {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.scene-description-field {
  flex: 1;
  margin-top: 14px;
}
.scene-location-grid .field textarea {
  flex: 1;
  min-height: 190px;
}
.scene-location-grid .map {
  min-height: 180px;
  aspect-ratio: 4 / 3;
}

.hr { height: 1px; background: var(--line); border: 0; margin: 16px 0; }
.dot-divide { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

.map {
  position: relative; width: 100%;
  height: auto;
  min-height: 220px;
  aspect-ratio: var(--map-ratio);
  background: linear-gradient(180deg, #ece4d2, #ddd3bd);
  border-radius: 4px; overflow: hidden; border: 1px solid var(--line);
}
.amap-canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.map.amap-live .amap-canvas {
  opacity: 1;
  pointer-events: auto;
}
.map.amap-live::before { opacity: 0; }
.map::before {
  content: ""; position: absolute; inset: 0; opacity: .28;
  background-image:
    linear-gradient(#a89070 1px, transparent 1px),
    linear-gradient(90deg, #a89070 1px, transparent 1px),
    radial-gradient(ellipse at 20% 32%, transparent 30%, rgba(168,144,112,.35) 31%, transparent 33%),
    radial-gradient(ellipse at 76% 66%, transparent 25%, rgba(168,144,112,.25) 26%, transparent 29%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
}
.pin { position: absolute; width: 14px; height: 14px; transform: translate(-50%, -100%); }
.pin::before {
  content: ""; display: block; width: 14px; height: 14px;
  border-radius: 50% 50% 50% 0; background: var(--accent);
  transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.pin.small { width: 10px; height: 10px; }
.pin.small::before { width: 10px; height: 10px; background: var(--green); }
.pin.main::before { background: var(--accent); }
.map.interactive { cursor: crosshair; }
.map.interactive:hover { border-color: var(--accent); }
.map-label {
  position: absolute; left: 12px; bottom: 10px;
  font: 10px var(--mono); color: var(--ink-2);
  background: rgba(248,244,237,.85); padding: 3px 8px; border-radius: 2px;
}
.map-coords {
  position: absolute; right: 12px; bottom: 10px;
  font: 10px var(--mono); color: var(--accent);
  background: rgba(248,244,237,.9); padding: 3px 8px; border-radius: 2px;
}
.evidence-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.evidence-strip .real-photo,
.evidence-strip .ph {
  width: 58px !important;
  height: auto !important;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sticky { position: sticky; top: 84px; align-self: start; }
.section {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 0 40px 40px;
}
.home-hero {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 48px 40px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 40px;
  align-items: center;
}
.home-alert {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 0 40px 32px;
}
.home-hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.home-hero-brand .brand-mark {
  width: 72px !important;
  height: 72px !important;
}
.hero-title { font-size: 44px; line-height: 1.18; margin: 8px 0 14px; letter-spacing: 1px; font-weight: 600; }


.home-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 460px));
  justify-content: start;
  gap: 16px;
}
.home-case-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.home-case-card:hover {
  border-color: #dcc8aa;
  box-shadow: 0 10px 24px rgba(80, 56, 36, .08);
  transform: translateY(-1px);
}
.home-case-thumb {
  background: var(--cream-2);
  aspect-ratio: var(--photo-ratio);
  min-height: 150px;
  overflow: hidden;
}
.home-case-thumb .real-photo,
.home-case-thumb .ph {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
}
.home-case-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 14px;
}
.home-case-meta {
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}

.case-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 40px 48px;
}
.case-detail-photo-panel {
  position: sticky;
  top: 84px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.case-detail-photo-wrap {
  padding: 18px 18px 0;
  background: var(--cream-2);
}
.case-detail-photo-wrap .real-photo,
.case-detail-photo-wrap .ph {
  width: 100% !important;
  height: auto !important;
  max-height: 520px;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
}
.case-detail-title-card {
  padding: 18px;
  background: var(--paper);
}
.case-detail-title-card h1 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: .6px;
  margin: 12px 0 6px;
}
.case-detail-info {
  padding: 28px;
}
.case-detail-body {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 40px;
}

.geo-map {
  height: var(--h, 220px);
  min-height: 0;
  aspect-ratio: auto;
}

.publish-shell {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 32px 40px 40px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 260px;
  gap: 32px;
}

.report-shell {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 32px 40px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 36px;
  align-items: start;
}

.profile-head,
.profile-tabs,
.profile-grid,
.profile-activity {
  width: min(100%, 1520px);
  margin: 0 auto;
}
.profile-head { padding: 40px 64px 0; }
.profile-tabs { padding: 4px 64px 24px; }
.profile-grid {
  padding: 8px 64px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 520px));
  gap: 18px;
  justify-content: start;
}
.profile-activity { padding: 0 64px 48px; }

.admin-content {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 24px;
}
.admin-content.narrow {
  max-width: 1180px;
}
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}
.admin-account-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-top {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px; background: var(--ink); color: var(--cream);
}
.admin-top nav { display: flex; gap: 20px; font-size: 13px; }
.admin-top nav a { cursor: pointer; }
.risk-bar { width: 80px; height: 6px; background: var(--line); border-radius: 100px; overflow: hidden; }

.split-table-row {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
}
.split-table-row:last-child { border-bottom: 0; }
.manual-review-row {
  align-items: flex-start;
  cursor: pointer;
}
.manual-review-check {
  width: 18px; height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.status-dot {
  width: 18px; height: 18px; border-radius: 50%;
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}

.timeline {
  border-left: 1.5px solid var(--accent-soft);
  padding-left: 24px; margin-left: 8px;
}
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item::before {
  content: ""; position: absolute; left: -32px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--accent);
}
.timeline-item.done::before { background: var(--accent); }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: var(--cream);
  padding: 12px 18px; border-radius: 4px;
  font-size: 13px; box-shadow: 0 12px 30px rgba(40,30,20,.3);
  z-index: 100; max-width: 340px;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

.empty { padding: 24px; text-align: center; color: var(--ink-3); font-size: 13px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(40,30,20,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 80; backdrop-filter: blur(2px);
}
.modal {
  background: var(--paper); border-radius: 8px;
  width: 420px; max-width: 92vw; padding: 24px;
  box-shadow: 0 24px 60px rgba(40,30,20,.3);
}

/* ============================================================
 *  移动端响应式  (<= 768px)
 *  app.js 里大量内联 grid/padding 通过属性选择器 + !important 覆盖
 * ============================================================ */
@media (max-width: 768px) {
  body { font-size: 13.5px; }

  /* 顶部导航 */
  .nav {
    padding: 10px 14px !important;
    gap: 10px !important;
    flex-wrap: wrap;
  }
  .nav.dense { padding: 10px 12px !important; }
  .brand { font-size: 16px; gap: 6px; }
  .nav-links {
    order: 99;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 16px !important;
    padding-bottom: 2px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; font-size: 13px; }
  .nav-cta { gap: 6px !important; margin-left: auto; }
  .nav-cta > .muted { display: none; }
  .nav-cta > .row > span { display: none; }

  /* 通用 grid 类 */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .section { padding: 0 14px 24px !important; }
  .home-hero,
  .home-alert,
  .publish-shell,
  .report-shell,
  .profile-head,
  .profile-tabs,
  .profile-grid,
  .profile-activity,
  .admin-content {
    width: 100%;
    padding: 18px 14px !important;
    margin: 0;
  }
  .home-hero,
  .publish-shell,
  .report-shell,
  .admin-dashboard-grid,
  .admin-account-shell {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .profile-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .sticky { position: static !important; top: auto !important; }
  .home-hero-brand {
    gap: 10px !important;
    margin-bottom: 6px !important;
  }
  .home-hero-brand .brand-mark {
    width: 54px !important;
    height: 54px !important;
  }
  .hero-title { font-size: 26px !important; line-height: 1.22 !important; letter-spacing: .3px !important; margin: 6px 0 12px !important; }

  /* 内联 grid 模板：所有 desktop 多列布局降为单列 */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    grid-auto-flow: row !important;
    gap: 16px !important;
    align-items: stretch !important;
  }

  /* 内联 padding 缩小（覆盖 user/admin 多个 section） */
  [style*="padding:48px 40px"],
  [style*="padding:48px 64px"],
  [style*="padding:32px 40px"],
  [style*="padding:32px 64px"],
  [style*="padding:36px 40px"],
  [style*="padding:40px 64px"],
  [style*="padding:4px 64px"],
  [style*="padding:8px 64px"],
  [style*="padding:0 64px"],
  [style*="padding:0 40px"],
  [style*="padding:24px"] {
    padding: 18px 14px !important;
  }
  [style*="padding:14px 28px"] { padding: 10px 12px !important; }
  [style*="padding:16px"]:not(.card) { padding: 12px !important; }


  .home-case-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-case-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .home-case-thumb { min-height: 118px; }
  .home-case-body { padding: 12px; }
  .home-case-meta { padding-top: 10px; }

  /* 案件详情：竖版照片在移动端改为单列，避免图片占满首屏 */
  .case-detail-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 14px 28px;
  }
  .case-detail-photo-panel {
    position: static;
  }
  .case-detail-photo-wrap { padding: 12px 12px 0; }
  .case-detail-photo-wrap .real-photo,
  .case-detail-photo-wrap .ph {
    max-height: 360px;
    object-position: center top;
  }
  .case-detail-title-card { padding: 14px; }
  .case-detail-title-card h1 { font-size: 28px; }
  .case-detail-info { padding: 16px; }
  .case-detail-body { padding: 18px 14px 28px; }

  /* 大图占位 */
  [style*="height:760px"] { height: 340px !important; }
  [style*="height:280px"] { height: 180px !important; max-width: 160px !important; }
  [style*="height:180px"] { height: 140px !important; }
  [style*="height:130px"] { height: 110px !important; }
  [style*="height:128px"] { height: 110px !important; }
  [style*="width:96px"][style*="height:128px"] { width: 72px !important; height: 96px !important; }

  /* 详情页绝对定位标题贴边 */
  [style*="position:absolute"][style*="bottom:32px"] {
    left: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
  }
  [style*="font-size:56px"] { font-size: 32px !important; line-height: 1.1 !important; }
  [style*="font-size:48px"] { font-size: 30px !important; }
  [style*="font-size:44px"] { font-size: 28px !important; }
  [style*="font-size:30px"] { font-size: 22px !important; }
  [style*="font-size:32px"] { font-size: 22px !important; }
  [style*="font-size:28px"] { font-size: 20px !important; }

  /* 按钮 - 触摸友好 */
  .btn { min-height: 40px; padding: 0 14px; }
  .btn.tiny { min-height: 30px; padding: 0 10px; }
  .btn.big { min-height: 46px; padding: 0 16px; font-size: 14px; }
  .row.gap-12 > .btn, .row.gap-8 > .btn { flex: 1 1 0; min-width: 0; }

  /* 卡片 */
  .card { padding: 14px; }

  /* 时间轴 */
  .timeline { padding-left: 18px; margin-left: 4px; }
  .timeline-item::before { left: -26px; width: 8px; height: 8px; }

  /* AI 年龄推算的候选缩略图行 */
  .row.gap-12.age-chip-row, [data-set-age] { flex: 0 0 84px !important; }
  [data-set-age] { padding: 6px !important; }

  /* 通用：内联 flex row 折行 */
  .row.gap-16, .row.gap-24, .row.gap-28, .row.gap-32 { flex-wrap: wrap; }
  .row.between.center { flex-wrap: wrap; gap: 8px; }

  /* 表单 grid 折单列 */
  .field { width: 100%; }
  .field input, .field textarea, .field select { font-size: 16px; /* 防止 iOS 自动放大 */ }
  .scene-location-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .scene-location-grid .field textarea { min-height: 150px; }
  .scene-location-grid .map { min-height: 220px; }

  /* 页脚 */
  .foot {
    padding: 14px !important;
    flex-wrap: wrap;
    gap: 6px !important;
    font-size: 11px;
    line-height: 1.6;
  }
  .foot .dot-divide { display: none; }
  .foot > span[style*="margin-left:auto"] { margin-left: 0 !important; width: 100%; padding-top: 4px; border-top: 1px solid var(--line); }

  /* 浮窗/原型导航触发器在桌面端是右下方按钮，移动端缩小 */
  .launcher-trigger { padding: 8px 10px; font-size: 11px; bottom: 12px; right: 12px; }
  .launcher-panel { width: calc(100vw - 24px); right: 12px; bottom: 60px; }

  /* 管理员端 顶部 bar */
  .admin-top {
    flex-wrap: wrap;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .admin-top > .row { width: auto; }
  .admin-top nav {
    order: 99;
    width: 100%;
    gap: 14px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-top nav::-webkit-scrollbar { display: none; }
  .admin-top .tag-num { display: none; }

  /* admin queue 列表 + 详情面板上下堆叠（已被 [style*="grid-template-columns"] 一刀切处理） */
  .split-table-row { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }

  /* admin 决策栏 sticky 按钮组折行 */
  [style*="position:sticky"][style*="bottom:0"] {
    padding: 10px 12px !important;
  }
  [style*="position:sticky"][style*="bottom:0"] form.row,
  [style*="position:sticky"][style*="bottom:0"] .row {
    flex-wrap: wrap;
    gap: 8px !important;
  }
  [style*="position:sticky"][style*="bottom:0"] input[name="reason"] {
    width: 100%;
    flex: 1 1 100% !important;
  }
  [style*="position:sticky"][style*="bottom:0"] .btn { flex: 1 1 30%; }

  /* 详情头像 portrait 圆形头像缩小 */
  [style*="width:64px"][style*="height:64px"] { width: 56px !important; height: 56px !important; }

  /* 上下间距 */
  .hr { margin: 12px 0; }

  /* AI 滑杆下方刻度 */
  .row.between [style*="font-size:10px"] { font-size: 9px !important; }
}
