* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #07c160;          /* 微信绿 */
  --brand-dark: #06ad56;
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #8a8f99;
  --border: #e6e8eb;
  --danger: #fa5151;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

/* 顶部导航 */
.navbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  background: var(--brand); color: #fff;
  padding: 14px 16px;
  font-size: 17px; font-weight: 600;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}
.navbar a { color: #fff; text-decoration: none; }
.navbar .spacer { flex: 1; }
.navbar .sub { font-size: 14px; font-weight: 400; opacity: .9; }

.container { max-width: 560px; margin: 0 auto; padding: 14px; }
.card {
  background: var(--card); border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* 提示条 */
.banner {
  background: #fff7e6; color: #ad6800;
  border: 1px solid #ffe1b3; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 12px; line-height: 1.5;
}
.banner.error { background: #fff1f0; color: #cf1322; border-color: #ffccc7; }

/* 地图 */
#map { width: 100%; height: 300px; border-radius: 10px; overflow: hidden; }
.map-wrap { position: relative; }
.map-actions {
  position: absolute; z-index: 40; right: 10px; bottom: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.map-btn {
  background: #fff; border: none; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); padding: 9px 12px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.map-btn.primary { background: var(--brand); color: #fff; font-weight: 600; }

/* 表单 */
label.field { display: block; margin-bottom: 12px; }
label.field .lbl { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: block; }
input[type=text], textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 15px; font-family: inherit;
  background: #fafafa; outline: none;
}
input[type=text]:focus, textarea:focus { border-color: var(--brand); background: #fff; }
textarea { resize: vertical; min-height: 80px; }
.coord-readout { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 照片 */
.photos-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-item { position: relative; width: 90px; height: 90px; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.photo-item .del {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
  background: var(--danger); color: #fff; border: none; border-radius: 50%;
  font-size: 14px; line-height: 1; cursor: pointer;
}
.photo-add {
  width: 90px; height: 90px; border: 1px dashed var(--border);
  border-radius: 8px; background: #fafafa; color: var(--muted);
  font-size: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* 按钮 */
.btn {
  display: block; width: 100%; border: none; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600;
  padding: 14px; cursor: pointer;
}
.btn:active { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.small { display: inline-block; width: auto; padding: 8px 16px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* 结果弹层 */
.mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45); display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 380px;
  padding: 22px; text-align: center;
}
.modal h3 { font-size: 18px; margin-bottom: 8px; }
.modal .url {
  display: block; background: #f5f5f5; border-radius: 8px; padding: 10px;
  font-size: 13px; word-break: break-all; color: #57606a; margin: 12px 0;
}
.modal .tip { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }

/* 分享页 */
.point-photo { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin-bottom: 4px; }
.photos-strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; }
.photos-strip img { height: 64px; border-radius: 8px; flex: 0 0 auto; }
.point-title { font-size: 20px; font-weight: 700; margin: 8px 0 4px; }
.point-note { font-size: 14px; color: #333; white-space: pre-wrap; line-height: 1.6; margin: 6px 0 12px; }
.point-addr { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.nav-btns { display: flex; gap: 10px; margin: 14px 0; }
.nav-btns .btn { flex: 1; }
#vmap { width: 100%; height: 260px; border-radius: 10px; }

/* 列表 */
.list-item {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
  align-items: center; text-decoration: none; color: inherit;
}
.list-item:last-child { border-bottom: none; }
.list-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #eee; }
.list-item .li-title { font-size: 15px; font-weight: 600; }
.list-item .li-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }

@media (min-width: 600px) {
  #map { height: 380px; }
  #vmap { height: 340px; }
}
