/* ==========================================================
   SCAU 植物地图 · styles.css
   移动优先：375px 完美可用，内容 max-width 720px 居中；
   绿色主题（主色 #2e7d32，浅底 #e8f5e9）；触控目标 ≥44px。
   ========================================================== */

/* ---------- 1. 基础与设计令牌 ---------- */
:root {
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-soft: #e8f5e9;
  --bg: #f4f8f4;
  --card: #ffffff;
  --ink: #1f2a20;
  --muted: #6b7a72;
  --line: #dce8dc;
  --danger: #b91c1c;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; }
.hidden { display: none !important; }

/* ---------- 2. 顶栏（sticky） ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(46, 125, 50, .06);
}
.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-height: 56px;
}
.brand {
  font-size: 16px;
  margin: 0;
  letter-spacing: .3px;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.topbar-user {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}

/* ---------- 3. 布局容器 ---------- */
main { max-width: 720px; margin: 0 auto; padding: 12px; }
.view { display: block; }

.subbar { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.subbar-title { font-weight: 600; color: var(--muted); font-size: 15px; }
.back-btn {
  min-height: 44px;
  padding: 0 14px 0 6px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 10px 0 28px;
}
.footer-icp { color: var(--muted); text-decoration: underline; }
.footer-link {
  background: none; border: 0; padding: 0 0 0 8px; margin: 0;
  color: var(--muted); font-size: 12px; text-decoration: underline;
  cursor: pointer; min-height: 0;
}

/* 关于与隐私页 */
.about-card { line-height: 1.75; }
.about-card h3 { font-size: 16px; margin: 18px 0 6px; color: var(--primary-dark); }
.about-card h3:first-child { margin-top: 0; }
.about-card h4 { font-size: 14px; margin: 12px 0 4px; color: var(--text); }
.about-card p { margin: 6px 0; }
.about-card ul { margin: 4px 0; padding-left: 20px; }
.about-card li { margin: 4px 0; }
.about-meta {
  margin-top: 20px !important; padding-top: 10px; border-top: 1px dashed var(--line);
  color: var(--muted); font-size: 12.5px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.card-title { font-size: 17px; margin: 0 0 4px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.stack { display: grid; gap: 10px; }

/* ---------- 4. 按钮与表单控件（触控 ≥44px） ---------- */
.btn {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible,
.back-btn:focus-visible,
.link-btn:focus-visible,
.map-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.btn.accent { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary-dark); }
.btn.warn { background: #fff4e5; border-color: #f0dcc0; color: #b45309; }
.btn.danger { color: var(--danger); border-color: #f0d2d2; background: #fff; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.small { min-height: 44px; padding: 8px 10px; font-size: 14px; }

input[type=text],
input[type=search],
input[type=password],
input[type=number],
input[type=date],
input[type=datetime-local],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b7a72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(46, 125, 50, .28);
  border-color: var(--primary);
}
textarea { min-height: 88px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9db0a0; }

.field { margin: 14px 0; }
.field > label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}
.optional { font-weight: 400; }

.link-btn {
  border: 0;
  background: none;
  color: var(--primary);
  padding: 8px 0;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  text-decoration: underline;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 5. 列表视图：筛选 + 卡片 ---------- */
.filter-card { display: grid; gap: 8px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.search-row .btn { flex-shrink: 0; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row .grow { flex: 1; min-width: 130px; }
.date-range { display: flex; gap: 8px; align-items: center; }
.date-range input { flex: 1; min-width: 0; }
.date-sep { color: var(--muted); flex-shrink: 0; }

.list-status { color: var(--muted); font-size: 13px; margin: 14px 2px 8px; }
.list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  padding: 18px 0;
}
.spin {
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cards { display: grid; gap: 12px; }
.record-card {
  display: flex;
  gap: 12px;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.record-card:active { background: #f7fbf7; }
.record-card .thumb {
  width: 108px;
  min-width: 108px;
  height: 108px;
  object-fit: cover;
  background: var(--primary-soft);
}
.record-body {
  padding: 10px 12px 10px 0;
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
  align-content: start;
}
.species {
  font-weight: 700;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
}
.chip {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  line-height: 20px;
}
.record-note {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
  font-size: 14px;
  cursor: pointer;
}
.load-more-wrap { display: flex; justify-content: center; padding: 16px 0 4px; }

/* ---------- 6. 详情视图 ---------- */
.detail-card { display: grid; gap: 12px; }
.detail-photo {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  background: #101c11;
  border-radius: var(--radius);
}
.detail-fields {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 14px;
}
.field-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef3ee;
  align-items: flex-start;
}
.field-row:last-child { border-bottom: 0; }
.field-row .k {
  min-width: 72px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 13.5px;
  padding-top: 1px;
}
.field-row .v {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.field-row .v.species-big { font-weight: 700; font-size: 17px; color: var(--primary-dark); }
.detail-error {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  display: grid;
  gap: 12px;
  justify-items: center;
}
.detail-error p { margin: 0; }

/* ---------- 7. 小地图（高德 / 降级面板） ---------- */
.map-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.map-title { font-size: 13.5px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.mini-map { height: 280px; border-radius: 10px; background: #eef3ee; }
/* 上传页坐标校准地图：240px 足够看清街区和标记 */
.calib-map {
  height: 240px;
  margin-top: 10px;
  border-radius: 10px;
  background: #eef3ee;
  overflow: hidden;
}
.calib-map-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 72px;
  padding: 12px 14px;
  background: var(--primary-soft);
  color: var(--muted);
  text-align: center;
}
.calib-map-notice .hint { margin: 0; }
.map-fallback {
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.map-coords {
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.map-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 14.5px;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 8. 上传视图 ---------- */
.gate { text-align: center; }
.gate .stack { max-width: 320px; margin: 12px auto 0; }

.photo-actions { display: flex; gap: 10px; }
.photo-actions .photo-pick { flex: 1; }

.photo-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: #fbfdfb;
  cursor: pointer;
  text-align: center;
  padding: 12px;
  color: var(--primary-dark);
  -webkit-tap-highlight-color: transparent;
}
.photo-pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 100px;
}
.photo-pick-icon { font-size: 24px; }

/* 物种联想下拉（绝对定位，z-index 高于卡片） */
.species-row { display: flex; gap: 8px; align-items: flex-start; }
.species-input-wrap { position: relative; flex: 1; min-width: 0; }
.species-row .btn { flex-shrink: 0; }
.suggest-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 15;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  max-height: 296px;
  overflow-y: auto;
  padding: 4px;
}
.suggest-item {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.suggest-item:hover, .suggest-item:active { background: var(--primary-soft); }
.suggest-name {
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-latin { font-size: 12.5px; font-style: italic; color: var(--muted); }

.photo-preview {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--primary-soft);
  margin-top: 10px;
}
.coord-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coord-actions { display: flex; gap: 8px; margin-top: 8px; }
.coord-actions input { flex: 1; min-width: 0; }
.coord-actions .btn { flex-shrink: 0; }
.geo-btn { margin-top: 8px; }

/* 我的记录卡片 / 拍摄人筛选条 */
.my-records-row { display: flex; gap: 8px; }
.my-records-row input { flex: 1; min-width: 0; }
.my-records-row .btn { flex-shrink: 0; }
.recorder-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--primary-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px 2px 2px 14px;
  margin: 10px 0 2px;
  color: var(--primary-dark);
  font-size: 14px;
}
.recorder-filter-x {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--primary-dark);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 详情操作按钮（编辑 + 删除） */
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 编辑表单照片（只展示不可改） */
.edit-photo {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #101c11;
  border-radius: 12px;
}

/* 上传：多图网格 */
.photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.photo-cell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--primary-soft);
  aspect-ratio: 1;
}
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cell-tag {
  position: absolute;
  left: 4px;
  top: 4px;
  background: rgba(46, 125, 50, .92);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
}
.photo-cell-x {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 审核徽标 */
.badge-status {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-pending { background: #fff4e5; color: #b45309; }
.badge-confirmed { background: var(--primary-soft); color: var(--primary-dark); }

/* 详情多图网格 */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--primary-soft);
  cursor: pointer;
}

/* 照片管理（管理员：添加 / 更换 / 设封面） */
.photo-manager { margin-top: 10px; }
.pm-title { margin: 0 0 8px; font-size: 15px; }
.pm-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.pm-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--primary-soft);
}
.pm-meta { flex: 1; min-width: 0; }
.pm-meta .hint { margin: 2px 0 0; }
.pm-label { font-size: 14px; font-weight: 600; }
.pm-label.is-cover { color: var(--primary-dark); }
.pm-tools { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.pm-tools .btn { min-height: 34px; padding: 4px 12px; }

/* 大图 lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(10, 14, 11, .92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* 弹层（管理员模式） */
.modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay { position: absolute; inset: 0; background: rgba(20, 28, 21, .45); }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}
.modal-box .card-title { margin: 0; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-box-wide { max-width: 460px; max-height: 82vh; overflow-y: auto; }

/* 名录管理 */
.manage-toolbar { display: grid; gap: 8px; }
.manage-actions { display: flex; gap: 8px; }
.manage-actions .btn { flex: 1; }
.manage-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; }
.manage-pager .btn { min-height: 44px; padding: 6px 10px; font-size: 13.5px; }
.manage-count { color: var(--muted); font-size: 12.5px; text-align: center; flex: 1; }
.manage-list { display: grid; gap: 8px; }
.manage-row {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}
.manage-info { flex: 1; min-width: 0; }
.manage-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.manage-sub { color: var(--muted); font-size: 12.5px; }
.manage-latin { font-style: italic; font-size: 13px; color: var(--primary-dark); overflow-wrap: anywhere; }
.manage-aliases {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.manage-row-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.manage-row-actions .btn { min-height: 44px; padding: 6px 12px; font-size: 13.5px; }

/* 名录体检 */
.audit-list { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
.audit-row {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.audit-type {
  font-size: 11.5px;
  color: #b45309;
  background: #fff4e5;
  border-radius: 999px;
  padding: 0 8px;
  line-height: 18px;
  justify-self: start;
}
.audit-entry { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.audit-detail { color: var(--muted); font-size: 12.5px; }
.audit-ok { color: var(--primary-dark); font-weight: 600; text-align: center; padding: 12px 0; }

/* 地图总览 */
.map-filter-row { margin-bottom: 10px; display: flex; gap: 8px; }
.map-locate-btn { flex-shrink: 0; }
.map-canvas { height: 60vh; border-radius: 14px; background: #eef3ee; }

/* 记录标记：首图缩略图 + 名称 */
.record-marker { display: flex; flex-direction: column; align-items: center; }
.record-marker-photo {
  width: 54px; height: 54px; object-fit: cover; display: block;
  border-radius: 10px; border: 2px solid #fff; background: #e8f5e9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.record-marker-name {
  margin-top: 2px; max-width: 96px; padding: 1px 6px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.95); color: #1f3d24; font-size: 11px; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.record-marker::after {
  content: ""; width: 0; height: 0; margin-top: -1px;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* 聚合标记（同一网格内多条记录） */
.cluster-marker {
  min-width: 36px; height: 36px; padding: 0 6px; border-radius: 18px;
  background: #2e7d32; color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 用户当前位置蓝点 */
.user-location-dot {
  width: 16px; height: 16px; border-radius: 50%; background: #1a73e8;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
}
.map-fallback-box { display: grid; gap: 8px; }
.map-group-title { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin: 10px 0 4px; }
.map-point-row {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}
.map-point-row:active { background: #f7fbf7; }
.map-point-species {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-point-meta { color: var(--muted); font-size: 12.5px; flex-shrink: 0; }

/* 管理面板 */
.subbar-exit { margin-left: auto; flex-shrink: 0; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-card-head .card-title { margin: 0; }
.admin-pending-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.admin-pending-row:hover,
.admin-pending-row:focus-visible { border-color: var(--primary); }
.admin-pending-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.admin-pending-row img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--primary-soft);
  flex-shrink: 0;
}
.admin-pending-info { flex: 1; min-width: 0; }
.admin-pending-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.admin-pending-meta { color: var(--muted); font-size: 12px; }
.admin-pending-row .btn { flex-shrink: 0; min-height: 44px; padding: 6px 12px; font-size: 13.5px; }
.admin-pending-open { color: var(--primary); font-size: 12px; margin-top: 2px; }
.admin-pending-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.admin-pending-actions .btn { min-height: 36px; padding: 6px 14px; }
/* 点行内联展开的上传细节 */
.admin-pending-detail {
  flex-basis: 100%;
  border-top: 1px dashed var(--line);
  margin-top: 2px;
  padding-top: 10px;
  cursor: default;
}
.admin-detail-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-detail-photos img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--primary-soft);
}
.admin-detail-fields { display: grid; grid-template-columns: 1fr; gap: 4px; }
.admin-detail-row { display: flex; gap: 10px; font-size: 13px; }
.admin-detail-row .k { color: var(--muted); flex: 0 0 64px; }
.admin-detail-row .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.admin-detail-map { margin-top: 8px; }
.admin-detail-map .map-fallback { min-height: 120px; }
.admin-pending-detail .btn { margin-top: 8px; }
.admin-funcs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }

/* 使用数据卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-cell {
  background: #f7fbf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}
.stat-value { font-size: 17px; font-weight: 700; color: var(--primary-dark); }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stats-chart { margin-top: 12px; }
.stats-chart-title { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stats-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding: 6px 2px 0;
  border-bottom: 1px solid var(--line);
}
.stat-bar-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.stat-bar {
  width: 60%;
  max-width: 22px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
}
.stat-bar-label {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
}

/* ---------- 9. Toast 与全屏 spinner ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(16px);
  max-width: 86%;
  background: rgba(31, 42, 32, .95);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ok { background: rgba(27, 94, 32, .95); }
.toast-err { background: rgba(146, 26, 26, .95); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(244, 248, 244, .7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay .spin { width: 28px; height: 28px; border-width: 3px; }

/* ---------- 10.5 点赞与评论 ---------- */
.interact-card {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.interact-bar { display: flex; align-items: center; gap: 10px; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  transition: background .15s, color .15s, border-color .15s;
}
.like-btn.liked {
  border-color: #f3c2c2;
  background: #fdecec;
  color: #c62828;
}
.like-btn:disabled { opacity: .6; }
.interact-counter { color: var(--muted); font-size: 14px; }
.comment-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.comment-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--primary-soft);
}
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-author { font-weight: 600; color: var(--primary-dark); font-size: 14px; }
.comment-time { color: var(--muted); font-size: 12px; }
.comment-del { margin-left: auto; }
.comment-text { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }
.comment-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-body {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.comment-body { min-height: 64px; resize: vertical; }
.comment-form .btn { align-self: flex-end; }
.record-stats { display: flex; gap: 12px; margin-top: 6px; color: var(--muted); font-size: 13px; }

/* ---------- 10. 屏幕宽度微调 ---------- */
@media (min-width: 720px) {
  .brand { font-size: 18px; }
  .record-card .thumb { width: 132px; min-width: 132px; height: 132px; }
}
@media (max-width: 380px) {
  .brand { font-size: 15px; }
  .topbar-inner { padding: 6px 8px; gap: 4px; }
  .topbar-actions { gap: 4px; }
  .btn.small { padding: 6px 8px; font-size: 13px; }
  .record-card .thumb { width: 96px; min-width: 96px; height: 96px; }
  main { padding: 10px; }
}
