/* AED 生命地图 · 视觉系统：红/黑/白二元制（救命场景拒绝暧昧色）
   常驻 120 走马条 + 全视口地图 + 底部抽屉列表 */
:root {
  --red: #e00;
  --red-dark: #b50000;
  --ink: #111;
  --paper: #fff;
  --line: #111;
  --grey: #666;
  --hairline: 1px solid #111;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); overflow: hidden; }

/* ---------- 常驻 120 走马条（救命优先于产品：任何界面常驻） ---------- */
.marquee {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  background: var(--red); color: #fff; overflow: hidden; height: 34px;
  display: flex; align-items: center;
}
.marquee-track {
  display: flex; white-space: nowrap;
  animation: marquee 20s linear infinite;
  font-size: 14px; font-weight: 600; letter-spacing: .05em;
}
.marquee-track span { padding: 0 1.5em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; top: 34px; left: 0; right: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(255,255,255,.94); border-bottom: var(--hairline);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand .logo-img { width: 26px; height: 26px; border-radius: 50%; }
.brand .logo { font-size: 18px; font-weight: 800; color: var(--red); }
.brand .sub { font-size: 11px; color: var(--grey); letter-spacing: .12em; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.pill {
  border: var(--hairline); background: #fff; color: var(--ink);
  font-size: 12px; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 600;
}
.pill.red { background: var(--red); border-color: var(--red); color: #fff; }
.pill.ghost { background: transparent; }
@media (max-width: 430px) {
  .topbar { padding: 8px 10px; }
  .brand .sub { display: none; }
  .pill { padding: 5px 9px; font-size: 11px; }
  .pill.red { white-space: nowrap; }
}

/* ---------- 地图 ---------- */
#map { position: fixed; inset: 0; top: 34px; z-index: 1; }
.aed-marker {
  background: var(--red); color: #fff; border: 2px solid #fff;
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.me-marker {
  width: 16px; height: 16px; border-radius: 50%;
  background: #111; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(17,17,17,.25);
}
.source-note {
  position: fixed; left: 10px; bottom: 10px; z-index: 1400; max-width: 62vw;
  font-size: 10px; color: var(--grey); background: rgba(255,255,255,.88);
  padding: 5px 8px; border-radius: 6px; line-height: 1.5;
}

/* ---------- 底部抽屉 ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1600;
  background: #fff; border-top: 2px solid var(--ink);
  max-height: 46vh; display: flex; flex-direction: column;
  transform: translateY(calc(100% - 118px)); transition: transform .28s ease;
}
.sheet.open { transform: translateY(0); }
.sheet-grip { padding: 10px 14px 6px; cursor: pointer; border-bottom: var(--hairline); }
.sheet-grip .bar { width: 44px; height: 4px; background: #ccc; border-radius: 2px; margin: 0 auto 8px; }
.sheet-grip .title { font-size: 15px; font-weight: 800; }
.sheet-grip .meta { font-size: 12px; color: var(--grey); margin-top: 2px; }
.sheet-body { overflow-y: auto; padding: 8px 14px 20px; }
.intel-item { padding: 12px 0; border-bottom: 1px dashed #ddd; cursor: pointer; }
.intel-item .desc { font-size: 15px; font-weight: 700; line-height: 1.4; }
.intel-item .row { display: flex; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--grey); flex-wrap: wrap; }
.intel-item .dist { color: var(--red); font-weight: 700; }
.badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 3px; border: 1px solid currentColor; }
.badge.warn { color: #b8860b; }
.badge.demo { color: #888; }
.empty-city { text-align: center; padding: 34px 24px; }
.empty-city .big { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.empty-city .small { font-size: 13px; color: var(--grey); line-height: 1.7; margin-bottom: 16px; }

/* ---------- 主行动按钮 ---------- */
.fab-locate {
  position: fixed; right: 14px; bottom: 132px; z-index: 1500;
  background: var(--red); color: #fff; border: none; border-radius: 999px;
  padding: 14px 20px; font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 20px rgba(224,0,0,.4); cursor: pointer;
}
.fab-report {
  position: fixed; right: 14px; bottom: 190px; z-index: 1500;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ---------- 弹层（定位说明/详情/上报/分享/绑定） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.45);
  display: none; align-items: flex-end; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; width: 100%; max-width: 520px; max-height: 82vh; overflow-y: auto;
  border-radius: 16px 16px 0 0; padding: 22px 20px 30px;
  animation: rise .25s ease;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.modal h2 .red { color: var(--red); }
.modal p.tip { font-size: 13px; color: var(--grey); line-height: 1.7; margin-bottom: 14px; }
.btn {
  display: block; width: 100%; padding: 14px; border-radius: 999px;
  font-size: 16px; font-weight: 800; cursor: pointer; border: 2px solid var(--ink);
  background: #fff; color: var(--ink); margin-top: 10px; text-align: center;
}
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: var(--hairline); border-radius: 10px; padding: 11px 12px;
  font-size: 15px; font-family: var(--font); background: #fff;
}
.field textarea { min-height: 72px; resize: vertical; }
.field .hint { font-size: 11px; color: var(--grey); margin-top: 4px; }

.detail-kv { margin: 12px 0; }
.detail-kv .k { font-size: 11px; color: var(--grey); letter-spacing: .08em; margin-top: 12px; }
.detail-kv .v { font-size: 15px; font-weight: 600; margin-top: 3px; line-height: 1.5; }
.confirm-strip { display: flex; gap: 10px; margin-top: 16px; }
.confirm-strip button {
  flex: 1; padding: 13px; border-radius: 12px; font-size: 15px; font-weight: 800; cursor: pointer;
}
.confirm-strip .ok { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.confirm-strip .gone { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.call120 {
  display: block; text-align: center; margin-top: 14px; padding: 12px;
  border: 2px solid var(--red); border-radius: 12px; color: var(--red);
  font-weight: 800; font-size: 16px; text-decoration: none;
}

/* 分享点位卡 */
.share-card {
  border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; margin: 12px 0;
}
.share-card .head { background: var(--red); color: #fff; padding: 14px 16px; }
.share-card .head .t { font-size: 12px; letter-spacing: .15em; opacity: .9; }
.share-card .head .d { font-size: 18px; font-weight: 800; margin-top: 4px; line-height: 1.4; }
.share-card .bd { padding: 14px 16px; font-size: 13px; color: var(--ink); line-height: 1.8; }
.share-card .ft { padding: 10px 16px; border-top: 1px dashed #ccc; font-size: 11px; color: var(--grey); }

.city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.city-grid button {
  padding: 16px; border: var(--hairline); border-radius: 12px; background: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.city-grid button:active { background: var(--ink); color: #fff; }

.foot-note {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1300;
  font-size: 10px; color: #999; text-align: center; padding: 4px 8px;
  background: rgba(255,255,255,.85); pointer-events: none;
}
.sms-row { display: flex; gap: 10px; }
.sms-row input { flex: 1; }
.sms-row .btn { width: auto; margin-top: 0; padding: 11px 16px; font-size: 13px; white-space: nowrap; }
