/* ============================================================
   狗狗露营地 · 移动端样式
   户外深色主题 / 大触控目标 / 390px 优先
   ============================================================ */
:root {
  --bg: #0a100c;
  --bg-soft: #0e1711;
  --surface: #142019;
  --surface-2: #1a2a20;
  --surface-3: #213529;
  --ink: #f0f5e9;
  --muted: #96a68f;
  --muted-2: #74836f;
  --line: rgba(224, 238, 212, 0.11);
  --line-strong: rgba(224, 238, 212, 0.18);
  --amber: #f2bd5c;
  --amber-deep: #dda33a;
  --amber-soft: rgba(242, 189, 92, 0.14);
  --green: #7fbd8b;
  --blue: #67b7ff;
  --danger: #f0796c;
  --danger-soft: rgba(240, 121, 108, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --tab-h: 66px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  background: #060a07;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(120% 55% at 50% -10%, rgba(108, 157, 99, 0.11), transparent 60%),
    var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
}

/* ---------- App bar ---------- */
.appbar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: calc(62px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 16px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 22, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  flex: 0 0 auto;
}
.brand-copy { min-width: 0; }
.brand-copy h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.brand-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}
.net-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  white-space: nowrap;
}
.net-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(127, 189, 139, 0.8);
}
.net-badge.offline .net-dot { background: var(--amber); box-shadow: 0 0 8px rgba(242, 189, 92, 0.7); }
.net-badge.offline { color: var(--amber); }

/* ---------- Layout ---------- */
.main { position: relative; flex: 1 1 auto; min-height: 0; }
.view { position: absolute; inset: 0; }
.view-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.page { padding: 20px 18px calc(28px + var(--safe-bottom)); }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.2em;
}
.page-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-sub { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.count-badge {
  flex: 0 0 auto;
  margin-top: 14px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
}

/* ---------- Map ---------- */
.view-map { overflow: hidden; background: #16251b; }
#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(80% 60% at 30% 25%, #243b2b, transparent 70%),
    linear-gradient(160deg, #1a2c20, #0d1711);
}
.leaflet-container {
  font-family: inherit;
  background: transparent;
  outline: none;
}
.leaflet-tile-pane { filter: brightness(0.91) saturate(0.78) contrast(1.03); }
.leaflet-control-attribution {
  background: rgba(10, 16, 12, 0.7) !important;
  color: #9baa95 !important;
  font-size: 9px !important;
  padding: 2px 6px !important;
  border-radius: 6px 0 0 0;
  backdrop-filter: blur(8px);
}
.leaflet-control-attribution a { color: #bdc9b6 !important; }
.leaflet-bottom.leaflet-right { z-index: 700; }

.radius-panel {
  position: absolute;
  z-index: 900;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(11, 18, 13, 0.86);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.radius-label {
  padding: 0 7px 0 5px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.radius-chip {
  min-width: 41px;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  transition: background 0.15s ease, color 0.15s ease;
}
.radius-chip:active { transform: scale(0.96); }
.radius-chip.active {
  background: var(--amber);
  color: #192113;
  box-shadow: 0 3px 10px rgba(242, 189, 92, 0.22);
}
.map-status {
  position: absolute;
  z-index: 900;
  left: 12px;
  bottom: calc(18px + var(--safe-bottom));
  max-width: calc(100% - 86px);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(11, 18, 13, 0.82);
  color: #dbe5d4;
  font-size: 11px;
  line-height: 1.35;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.locate-btn {
  position: absolute;
  z-index: 900;
  right: 12px;
  bottom: calc(42px + var(--safe-bottom));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(18, 30, 22, 0.94);
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.locate-btn svg { width: 23px; height: 23px; }
.locate-btn:active { transform: scale(0.94); }
.locate-btn.loading svg { animation: spin 1s linear infinite; color: var(--amber); }

.map-empty {
  position: absolute;
  z-index: 950;
  top: 50%;
  left: 24px;
  right: 24px;
  padding: 24px 20px 20px;
  transform: translateY(-52%);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(14, 23, 17, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.empty-icon { display: block; font-size: 34px; line-height: 1; margin-bottom: 10px; }
.map-empty h2 { margin: 0 0 7px; font-size: 18px; }
.map-empty p { margin: 0 auto 16px; max-width: 260px; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* Leaflet custom marker */
.camp-marker-wrap,
.user-marker-wrap {
  background: transparent !important;
  border: 0 !important;
}
.camp-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #122015;
  border-radius: 50%;
  background: linear-gradient(150deg, #ffd57c, #e4a638);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(242, 189, 92, 0.16);
  transition: transform 0.15s ease;
}
.camp-marker::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -7px;
  width: 13px;
  height: 13px;
  border-right: 3px solid #122015;
  border-bottom: 3px solid #122015;
  border-radius: 0 0 3px 0;
  background: #e4a638;
  transform: translateX(-50%) rotate(45deg);
}
.camp-marker svg { width: 23px; height: 23px; }
.camp-marker:hover { transform: scale(1.06); }
.camp-marker.is-hot { background: linear-gradient(150deg, #ffe6a8, #ffc957); }
.leaflet-marker-icon:focus-visible .camp-marker { outline: 3px solid #fff; }

.user-marker {
  position: relative;
  width: 22px;
  height: 22px;
}
.user-marker .pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(103, 183, 255, 0.24);
  animation: pulse 2.2s ease-out infinite;
}
.user-marker .dot {
  position: absolute;
  inset: 3px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #3f9dff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border: 1px solid var(--line-strong);
  border-radius: 16px !important;
  background: #15231a !important;
  color: var(--ink) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48) !important;
}
.leaflet-popup-content { margin: 0 !important; width: 208px !important; }
.leaflet-popup-tip { background: #15231a !important; border: 1px solid var(--line-strong); }
.leaflet-popup-close-button {
  top: 7px !important;
  right: 7px !important;
  width: 24px !important;
  height: 24px !important;
  color: var(--muted) !important;
  font-size: 18px !important;
  line-height: 22px !important;
}
.popup-card { padding: 13px 14px 12px; cursor: pointer; }
.popup-kicker { color: var(--muted); font-size: 9.5px; letter-spacing: 0.05em; margin-bottom: 4px; }
.popup-name {
  padding-right: 20px;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 750;
}
.popup-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.popup-rating { color: var(--amber); letter-spacing: 0.04em; }
.popup-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 650;
}

/* ---------- List ---------- */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease;
}
.search-box:focus-within { border-color: rgba(242, 189, 92, 0.5); }
.search-box svg { flex: 0 0 auto; width: 19px; height: 19px; color: var(--muted); }
.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 12px;
}
.toolbar-label { color: var(--muted-2); font-size: 11px; }
.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}
.sort-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.sort-btn.active { background: var(--surface-3); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }

.spot-list { display: flex; flex-direction: column; gap: 10px; }
.spot-card {
  display: flex;
  width: 100%;
  color: var(--ink);
  align-items: stretch;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.035), transparent 65%),
    var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.spot-card:active { transform: scale(0.985); border-color: var(--line-strong); }
.spot-cover {
  position: relative;
  flex: 0 0 94px;
  width: 94px;
  min-height: 94px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg, #2a4232, #15241a);
}
.spot-cover img { width: 100%; height: 100%; min-height: 94px; object-fit: cover; }
.cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 94px;
  color: rgba(242, 189, 92, 0.72);
  font-size: 28px;
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(242, 189, 92, 0.15), transparent 70%),
    linear-gradient(145deg, #273d2c, #132218);
}
.spot-main { flex: 1; min-width: 0; padding: 3px 2px 2px 0; display: flex; flex-direction: column; }
.spot-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.spot-title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.spot-distance {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.spot-sub { display: flex; align-items: center; gap: 7px; margin: 5px 0 7px; color: var(--muted); font-size: 10.5px; }
.spot-stars { color: var(--amber); letter-spacing: 0.02em; font-size: 10px; }
.spot-date { color: var(--muted-2); }
.spot-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.mini-tag {
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: #b7c7b0;
  font-size: 9px;
  line-height: 1.3;
}
.spot-arrow { display: flex; align-items: center; color: var(--muted-2); font-size: 19px; padding-right: 2px; }

.empty-state {
  padding: 44px 18px;
  text-align: center;
}
.empty-state h3 { margin: 0 0 7px; font-size: 18px; }
.empty-state p { max-width: 260px; margin: 0 auto 18px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }

/* ---------- Form ---------- */
.add-head { margin-bottom: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.section-title { font-size: 12px; font-weight: 700; color: #d8e2d2; }
.section-note { color: var(--muted-2); font-size: 10px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.photo-add,
.photo-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
}
.photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px dashed rgba(224, 238, 212, 0.22);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.photo-add:active { border-color: var(--amber); background: var(--amber-soft); }
.photo-add svg { width: 25px; height: 25px; color: var(--amber); }
.photo-grid.empty .photo-add {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 9px;
  aspect-ratio: 2.4 / 1;
}
.photo-grid.empty .photo-add svg { width: 29px; height: 29px; }
.photo-grid.empty .photo-add span { font-size: 12px; }
.photo-thumb { background: var(--surface-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(5, 9, 6, 0.75);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  backdrop-filter: blur(6px);
}
.photo-index {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(5, 9, 6, 0.64);
  color: #fff;
  font-size: 8px;
}
.field-hint { margin: 9px 1px 20px; color: var(--muted-2); font-size: 10.5px; line-height: 1.55; }

.form-card {
  padding: 4px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.field { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  color: #c8d5c1;
  font-size: 11.5px;
  font-weight: 650;
}
.field-label em { color: var(--amber); font-style: normal; }
.field-label small { color: var(--muted-2); font-size: 9.5px; font-weight: 400; }
.field input[type="text"],
.field input[type="date"],
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0d1610;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input[type="text"],
.field input[type="date"] { height: 48px; padding: 0 13px; font-size: 15px; }
.field textarea { min-height: 96px; padding: 12px 13px; resize: vertical; font-size: 14px; line-height: 1.6; }
.field input:focus,
.field textarea:focus { border-color: rgba(242, 189, 92, 0.55); }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.6; }

.rating-row { display: flex; align-items: center; gap: 2px; }
.star-btn {
  width: 37px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3e4d40;
  font-size: 29px;
  line-height: 1;
  transition: color 0.12s ease, transform 0.12s ease;
}
.star-btn.on { color: var(--amber); text-shadow: 0 0 16px rgba(242, 189, 92, 0.26); }
.star-btn:active { transform: scale(1.16); }
.rating-text { margin-left: 8px; color: var(--muted); font-size: 11px; }

.tag-options { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-option { position: relative; }
.tag-option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tag-option span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1610;
  color: #b7c5b0;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.tag-option input:checked + span {
  border-color: rgba(242, 189, 92, 0.65);
  background: var(--amber-soft);
  color: var(--amber);
}
.tag-option input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.tag-option span i { font-style: normal; font-size: 13px; }

.location-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(242, 189, 92, 0.055), transparent 75%), var(--surface);
}
.location-card.has-location { border-color: rgba(242, 189, 92, 0.3); }
.location-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--amber-soft);
  color: var(--amber);
}
.location-icon svg { width: 20px; height: 20px; }
.location-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.location-copy strong { font-size: 12px; font-weight: 700; }
.location-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.location-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-2);
  font-size: 9px;
}
.location-card .btn { padding: 0 11px; min-height: 38px; font-size: 11px; }

.form-actions { display: flex; gap: 9px; margin-top: 18px; }
.form-actions .btn-primary { flex: 1; }
.privacy-note { margin: 13px 0 0; color: var(--muted-2); text-align: center; font-size: 9.5px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.13s ease, filter 0.13s ease, background 0.13s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary {
  border-color: rgba(255, 231, 180, 0.34);
  background: linear-gradient(155deg, #ffd67d, #e7aa3f);
  color: #192113;
  box-shadow: 0 8px 22px rgba(223, 160, 53, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}
.btn-primary:active { filter: brightness(0.96); }
.btn-secondary {
  border-color: var(--line-strong);
  background: var(--surface-3);
  color: var(--ink);
}
.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #c2cfba;
}
.btn-danger-ghost {
  border-color: rgba(240, 121, 108, 0.3);
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 12px; border-radius: 11px; }
.btn-save { min-height: 52px; font-size: 14px; }

/* ---------- Detail sheet ---------- */
.sheet-overlay {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(3, 6, 4, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease both;
}
.detail-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  height: 92vh;
  height: min(92dvh, 880px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: #101a13;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.sheet-handle {
  width: 34px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 2px 12px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  color: #dbe5d4;
  font-size: 16px;
}
.detail-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.detail-photos {
  position: relative;
  display: flex;
  overflow-x: auto;
  min-height: 238px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: #0a110c;
}
.detail-photos::-webkit-scrollbar { display: none; }
.detail-photo { flex: 0 0 100%; width: 100%; height: 238px; scroll-snap-align: start; object-fit: cover; }
.detail-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 238px;
  background:
    radial-gradient(70% 60% at 30% 20%, rgba(242, 189, 92, 0.12), transparent 70%),
    linear-gradient(150deg, #273d2d, #132118);
  color: rgba(242, 189, 92, 0.7);
}
.detail-photo-placeholder span { font-size: 42px; }
.detail-photo-placeholder small { color: var(--muted); font-size: 10px; }
.photo-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(6, 10, 7, 0.56);
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}
.photo-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.34); transition: width 0.15s ease, background 0.15s ease; }
.photo-dot.active { width: 14px; border-radius: 999px; background: #fff; }
.photo-total {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(6, 10, 7, 0.58);
  color: #fff;
  font-size: 9.5px;
  backdrop-filter: blur(8px);
}
.detail-body { padding: 18px 18px 22px; }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title-row h2 { margin: 0; font-size: 23px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 800; }
.rating-badge {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 4px 7px;
  border: 1px solid rgba(242, 189, 92, 0.2);
  border-radius: 7px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}
.detail-meta { margin: 7px 0 12px; color: var(--muted); font-size: 11px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.detail-tag {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: #bdcbb6;
  font-size: 10px;
}
.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}
.stat { padding: 11px 12px; background: var(--surface); }
.stat-label { display: block; margin-bottom: 4px; color: var(--muted-2); font-size: 8.5px; }
.stat strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.detail-notes-block { padding-top: 1px; }
.detail-notes-block h3 { margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; }
.detail-notes-block p { margin: 0; color: #d2ddca; font-size: 13px; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(16, 26, 19, 0.96);
  backdrop-filter: blur(14px);
}
.detail-actions .nav-btn { flex: 1; min-width: 0; }
.detail-actions .btn { min-height: 49px; padding: 0 13px; font-size: 12px; }
.detail-actions .nav-btn.disabled { opacity: 0.45; pointer-events: none; }
.location-card.location-shake { animation: shake 0.35s ease; border-color: rgba(240, 121, 108, 0.7); }

/* ---------- Settings ---------- */
.summary-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 18px 18px 15px;
  border: 1px solid rgba(242, 189, 92, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(242, 189, 92, 0.18), transparent 58%),
    linear-gradient(145deg, #1b2b20, #121d16);
}
.summary-main { display: flex; align-items: baseline; gap: 7px; }
.summary-number { color: var(--amber); font-size: 45px; line-height: 1; font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.summary-label { color: #cad7c2; font-size: 12px; }
.summary-icon { position: absolute; top: 14px; right: 17px; font-size: 33px; opacity: 0.85; }
.summary-card p { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.55; }

.settings-group {
  margin-bottom: 16px;
  padding: 15px 14px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.settings-group h3 { margin: 0 0 3px; padding: 0 2px; font-size: 12.5px; font-weight: 700; }
.group-desc { margin: 0 2px 10px; color: var(--muted-2); font-size: 10px; line-height: 1.55; }
.settings-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 61px;
  padding: 9px 2px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
button.settings-row:active { opacity: 0.7; }
.settings-group h3 + .settings-row,
.settings-group .group-desc + .settings-row { border-top: 0; }
.row-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 16px;
}
.row-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.row-copy strong { font-size: 12.5px; font-weight: 650; }
.row-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 9.5px; }
.row-chevron { flex: 0 0 auto; color: var(--muted-2); font-size: 19px; }
.status-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(127, 189, 139, 0.7); }
.status-dot.offline { background: var(--amber); box-shadow: 0 0 8px rgba(242, 189, 92, 0.65); }
.danger-group { border-color: rgba(240, 121, 108, 0.16); }
.danger-group h3 { color: var(--danger); }
.settings-row.danger { color: var(--danger); }
.settings-row.danger .row-copy strong { color: var(--danger); }
.settings-footer { padding: 16px 0 8px; text-align: center; color: var(--muted-2); font-size: 9.5px; line-height: 1.7; }
.settings-footer p { margin: 0; }

/* ---------- Modal / toast / loading ---------- */
.modal-overlay {
  position: fixed;
  z-index: 4000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 6, 4, 0.74);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.16s ease both;
}
.modal-card {
  width: 100%;
  max-width: 390px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #152219;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  animation: popIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.modal-card h3 { margin: 0 0 9px; font-size: 17px; }
.modal-body { color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.modal-body p { margin: 0 0 12px; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 19px; }
.modal-actions .btn { width: 100%; }
.import-mode { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.import-option { display: flex; gap: 10px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #0e1811; color: #d6e1cf; font-size: 11.5px; line-height: 1.5; cursor: pointer; }
.import-option:has(input:checked) { border-color: rgba(242, 189, 92, 0.55); background: var(--amber-soft); }
.import-option input { margin: 2px 0 0; accent-color: var(--amber); }
.import-option strong { display: block; font-size: 12px; color: var(--ink); margin-bottom: 1px; }
.import-option small { display: block; color: var(--muted); font-size: 10px; }
.toast {
  position: fixed;
  z-index: 5000;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  max-width: calc(100% - 38px);
  padding: 11px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(242, 189, 92, 0.25);
  border-radius: 12px;
  background: rgba(29, 36, 23, 0.96);
  color: #f5edda;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  animation: toastIn 0.22s ease both;
  backdrop-filter: blur(12px);
}
.loading-overlay {
  position: fixed;
  z-index: 6000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 5, 0.6);
  backdrop-filter: blur(3px);
}
.loading-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 19px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #17251c;
  color: #e8f0e2;
  box-shadow: var(--shadow);
  font-size: 12.5px;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(242, 189, 92, 0.24);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: relative;
  z-index: 1100;
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding: 0 8px var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: rgba(12, 20, 14, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.tab {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 54px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #84947e;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}
.tab > svg { width: 22px; height: 22px; }
.tab.active { color: var(--amber); }
.tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--amber);
  transform: translateX(-50%);
  transition: width 0.18s ease;
}
.tab.active::before { width: 22px; }
.tab-add { color: #c8b783; }
.tab-plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: -13px;
  margin-bottom: 0;
  border: 1px solid rgba(255, 232, 178, 0.35);
  border-radius: 11px;
  background: linear-gradient(150deg, #ffd47a, #e3a538);
  color: #17200f;
  box-shadow: 0 7px 20px rgba(211, 149, 43, 0.29), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tab-plus svg { width: 19px; height: 19px; }
.tab-add.active { color: var(--amber); }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(0.65); opacity: 0.8; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(5%); opacity: 0.7; } to { transform: translateY(0); opacity: 1; } }
@keyframes popIn { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes toastIn { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Small screens ---------- */
@media (max-width: 355px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .radius-panel { right: 8px; }
  .radius-chip { min-width: 37px; padding: 0 7px; }
  .radius-label { display: none; }
  .spot-cover { flex-basis: 82px; width: 82px; min-height: 82px; }
  .spot-title { font-size: 15px; }
  .location-card { grid-template-columns: 34px minmax(0, 1fr); }
  .location-card .btn { grid-column: 1 / -1; }
  .detail-actions { padding-left: 10px; padding-right: 10px; }
  .detail-actions .btn { padding: 0 10px; font-size: 11px; }
}

@media (min-width: 621px) {
  .detail-sheet { border-radius: 26px; max-height: 88dvh; margin-bottom: 3vh; }
  .sheet-overlay { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   局域网 HTTP 提示条 + 手动选点器
   ============================================================ */
.insecure-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(242, 189, 92, 0.35);
  border-radius: 12px;
  background: rgba(242, 189, 92, 0.1);
  color: #f4d9a2;
  font-size: 12.5px;
  line-height: 1.5;
}
.insecure-banner span { flex: 1; }
.insecure-banner button {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(242, 189, 92, 0.35);
  background: transparent;
  color: inherit;
  font-size: 12px;
}

.picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(3, 6, 4, 0.72);
  backdrop-filter: blur(2px);
}
.picker-panel {
  width: 100%;
  max-width: 560px;
  height: min(92vh, 780px);
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  animation: pickerUp 0.22s ease;
}
@keyframes pickerUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.picker-head b { display: block; font-size: 15px; color: var(--ink); }
.picker-head small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.picker-close {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.picker-map { flex: 1; min-height: 240px; background: #0b120d; }
.picker-foot {
  padding: 10px 14px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  display: grid;
  gap: 9px;
  background: var(--bg);
}
.picker-coord { font-size: 12.5px; color: var(--muted); }
.picker-input-row { display: flex; gap: 8px; }
.picker-input-row input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
.picker-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 9px; }
.picker-actions .btn { height: 44px; border-radius: 12px; font-size: 14px; }
body.picker-open { overflow: hidden; }

/* 覆盖在 appbar 下方，避免被全屏地图盖住 */
.insecure-banner {
  position: fixed;
  top: calc(66px + var(--safe-top));
  left: 12px;
  right: 12px;
  margin: 0;
  z-index: 1100;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

/* 改到底部，避免遮挡顶部「附近」筛选 */
.insecure-banner {
  top: auto;
  bottom: calc(var(--tab-h) + 14px + var(--safe-bottom));
  left: 12px;
  right: 12px;
}

/* 实底，避免和地图文字重叠看不清 */
.insecure-banner {
  background: rgba(38, 30, 12, 0.96);
  border-color: rgba(242, 189, 92, 0.5);
  color: #f6dda8;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 选点器：用地图中心 + 提醒动画 */
.picker-center {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
}
.btn.attention {
  animation: attentionPulse 0.8s ease 3;
  border-color: var(--amber) !important;
  color: var(--amber) !important;
}
@keyframes attentionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 189, 92, 0); }
  50% { box-shadow: 0 0 0 4px rgba(242, 189, 92, 0.25); }
}

/* 营地名称旁的「定位取名」 */
.field-label { display: flex; align-items: center; gap: 8px; }
.name-map-btn {
  margin-left: auto;
  font-size: 11px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(242, 189, 92, 0.3);
  border-radius: 8px;
  padding: 2px 8px;
  line-height: 1.6;
}
.name-map-btn:active { transform: scale(0.96); }

/* ============================================================
   v2.0 · 账号 / 云同步 / 分享
   ============================================================ */

/* 详情底部：导航独占一行，编辑 / 分享 / 删除并排 */
.detail-actions { flex-wrap: wrap; }
.detail-actions .nav-btn { flex: 1 1 100%; }
.detail-actions .btn:not(.nav-btn) { flex: 1 1 0; }
.detail-actions .btn { padding: 0 10px; }

/* ---------- 设置页 · 账号 ---------- */
.account-group .group-desc { margin-bottom: 12px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field > span { padding-left: 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; }
.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #0e1811;
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.auth-field input::placeholder { color: var(--muted-2); }
.auth-field input:focus { outline: none; border-color: rgba(242, 189, 92, 0.55); background: #101c14; }
.auth-actions { display: flex; gap: 8px; }
.auth-actions .btn { flex: 1; }
.auth-hint { margin: 0 2px 8px; color: var(--muted-2); font-size: 9.5px; line-height: 1.6; }
.auth-msg { margin: 0 0 2px; padding: 8px 10px; border-radius: 9px; background: rgba(240, 121, 108, 0.1); color: #f0a49b; font-size: 10.5px; line-height: 1.5; }
.auth-msg.ok { background: rgba(127, 189, 139, 0.12); color: #a9d6b2; }

.account-user { display: flex; align-items: center; gap: 11px; padding: 2px 2px 12px; }
.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(242, 189, 92, 0.28);
  border-radius: 13px;
  background: var(--amber-soft);
  font-size: 19px;
}
.account-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sync-lines { display: flex; flex-direction: column; gap: 1px; }
.sync-lines small { color: var(--muted-2); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.sync-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(127, 189, 139, 0.7); }
.sync-dot.pending { background: var(--amber); box-shadow: 0 0 8px rgba(242, 189, 92, 0.7); }
.sync-dot.busy { background: var(--blue); box-shadow: 0 0 8px rgba(103, 183, 255, 0.75); animation: syncPulse 0.9s ease-in-out infinite; }
.sync-dot.offline { background: var(--muted-2); box-shadow: none; }
@keyframes syncPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.72); } }
.account-signed { padding-bottom: 8px; }

/* ---------- 分享弹窗 ---------- */
.share-link-box { display: flex; gap: 7px; margin: 4px 0 12px; }
.share-link-box textarea {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0e1811;
  color: #dbe6d4;
  font-size: 10.5px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  resize: none;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.share-link-box .btn { flex: 0 0 auto; align-self: stretch; min-height: 54px; padding: 0 14px; font-size: 12px; }
.share-modal-note { margin: 0; color: var(--muted-2); font-size: 10px; line-height: 1.6; }

/* ---------- 只读分享页 ---------- */
body.share-mode .appbar,
body.share-mode .tabbar { display: none; }
body.share-mode #app { display: none; }
.share-view {
  position: fixed;
  z-index: 3500;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  background:
    radial-gradient(120% 55% at 50% -10%, rgba(108, 157, 99, 0.13), transparent 60%),
    var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
}
.share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: calc(12px + var(--safe-top)) 16px 10px;
  border-bottom: 1px solid var(--line);
}
.share-home { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.share-badge { padding: 4px 9px; border: 1px solid rgba(242, 189, 92, 0.3); border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 9.5px; letter-spacing: 0.06em; }
.share-scroll { flex: 1; overflow-y: auto; padding: 16px 14px 20px; -webkit-overflow-scrolling: touch; }
.share-loading { padding: 80px 0; color: var(--muted); font-size: 12.5px; text-align: center; }
.share-error { padding: 70px 16px; text-align: center; }
.share-error h2 { margin: 12px 0 8px; font-size: 20px; }
.share-error p { margin: 0 auto 20px; max-width: 290px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.share-error .btn { display: inline-flex; }
.share-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.share-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 168px;
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(242, 189, 92, 0.16), transparent 65%),
    linear-gradient(150deg, #1b2b20, #101a14);
  border-bottom: 1px solid var(--line);
}
.share-photo-placeholder > span { font-size: 42px; opacity: 0.9; }
.share-photo-placeholder small { max-width: 250px; padding: 0 14px; color: var(--muted-2); font-size: 9.5px; line-height: 1.55; text-align: center; }
.share-body { padding: 17px 17px 20px; }
.share-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.share-title-row h1 { margin: 0; font-size: 23px; line-height: 1.25; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.share-meta { margin: 7px 0 12px; color: var(--muted); font-size: 11px; }
.share-stats { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 1px; overflow: hidden; margin: 15px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.share-stats .stat { background: var(--surface); }
.share-body .detail-notes-block { margin-bottom: 17px; }
.share-body > .btn { width: 100%; }
.share-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(16, 26, 19, 0.96);
  backdrop-filter: blur(14px);
}
.share-actions .btn-primary { flex: 1.4; }
.share-actions .btn-ghost { flex: 1; }

/* ---------- 分享页登录弹窗 ---------- */
.auth-overlay {
  position: fixed;
  z-index: 4500;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 6, 4, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.16s ease both;
}
.auth-overlay .modal-card { max-height: calc(100dvh - 44px); overflow-y: auto; }
.auth-overlay-desc { margin: 0 0 14px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.auth-overlay-cancel { width: 100%; margin-top: 8px; }

@media (max-width: 360px) {
  .share-actions { flex-direction: column; }
  .share-title-row h1 { font-size: 20px; }
}

/* 选点器标记：避免依赖 Leaflet 默认图标（vendor 里没有 marker 图片） */
.picker-marker-wrap { background: none; border: 0; }
.picker-marker {
  width: 24px;
  height: 24px;
  border: 3px solid #fff3d6;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  transform: translate(-2px, -2px);
}

/* 附近地点面板 */
.nearby-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(3, 6, 4, 0.72);
  backdrop-filter: blur(2px);
}
.nearby-panel {
  width: 100%;
  max-width: 560px;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  animation: pickerUp 0.22s ease;
}
.nearby-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}
.nearby-head b { display: block; font-size: 15px; color: var(--ink); }
.nearby-head small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.nearby-search { display: flex; gap: 8px; padding: 6px 14px 8px; }
.nearby-search input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13px;
}
.nearby-list { flex: 1; overflow-y: auto; padding: 0 14px 8px; }
.nearby-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); color: var(--ink); text-align: left;
}
.nearby-item:active { border-color: var(--amber); }
.nearby-item .nb-main { flex: 1; min-width: 0; }
.nearby-item strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-item small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-item .nb-dist { flex: none; font-size: 12px; color: var(--amber); }
.nearby-foot { margin: 0; padding: 8px 16px calc(12px + var(--safe-bottom)); font-size: 11px; color: var(--muted-2); text-align: center; }
.nearby-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; }

/* 营地位置卡片：两个按钮单独一行，避免挤进网格第 4 列 */
.location-card {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
}
.location-card .location-icon { grid-column: 1; grid-row: 1; }
.location-card .location-copy { grid-column: 2; grid-row: 1; }
.location-card .location-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.location-card .location-actions .btn { flex: 1; min-width: 0; }

/* 名称输入联想 */
.field-suggest-wrap { position: relative; }
.name-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.suggest-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  color: var(--ink);
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:active, .suggest-item:hover { background: var(--surface-3); }
.suggest-name { display: block; font-size: 13.5px; font-weight: 600; }
.suggest-item small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-empty { padding: 12px; font-size: 12px; color: var(--muted); text-align: center; }

/* 名称提示 + 位置卡片单一导航按钮 */
.name-hint { margin: 8px 1px 0; }
.location-selected { align-items: stretch; }
.location-selected .btn-primary { flex: 2; }
.location-selected .location-change { flex: 1; }

/* 添加 Tab 的 + 与其他图标上下对齐 */
.tab-plus {
  margin-top: 0;
  width: 30px;
  height: 30px;
  border-radius: 10px;
}
.tab-plus svg { width: 17px; height: 17px; }

/* 键盘弹出时，选地点面板跟随可视视口，不被遮住 */
.nearby-overlay { height: 100%; }
.nearby-panel { max-height: min(78vh, calc((var(--vvh, 100vh)) - 24px)); }

/* 详情页：距离可点击定位 */
.stat-clickable { cursor: pointer; }
.stat-clickable:active { border-color: var(--amber); }

/* 地图状态提示：可点击开启定位 */
.map-status.actionable { cursor: pointer; border-color: rgba(242, 189, 92, 0.45); color: var(--amber); }

/* 密码显示/隐藏 */
.pw-field { position: relative; }
.pw-field input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.pw-toggle:active { background: var(--surface-3); }

/* 类型 / 状态选择与筛选 */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice-chip, .filter-chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.choice-chip.active, .filter-chip.active {
  border-color: rgba(242, 189, 92, 0.55);
  background: var(--amber-soft);
  color: var(--amber);
}
.filter-row { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; padding: 6px 12px; font-size: 12px; }
.detail-badges { display: flex; gap: 8px; margin: 2px 0 10px; }
.detail-badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.detail-badge.wish { color: var(--amber); border-color: rgba(242, 189, 92, 0.45); }
.camp-marker .marker-emoji { display: grid; place-items: center; width: 100%; height: 100%; font-size: 20px; }
.camp-marker.wishlist { filter: drop-shadow(0 0 6px rgba(242, 189, 92, 0.65)); }

/* 标记：美食/其他 用圆形图标，想去加金色光晕 */
.camp-marker.marker-plain {
  background: var(--surface);
  border: 2px solid var(--amber);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.camp-marker.marker-plain .marker-emoji { font-size: 18px; line-height: 1; }
.camp-marker-wrap.is-wish .camp-marker { filter: drop-shadow(0 0 7px rgba(242,189,92,.75)); }
.mini-tag.wish { color: var(--amber); border-color: rgba(242,189,92,.45); }

/* 想去页 */
.wish-hint { margin: 0 0 14px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.wish-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.wish-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.wish-action:active { border-color: var(--amber); }
.wish-action-icon { font-size: 19px; }
.wish-action strong { font-size: 13px; }
.wish-action small { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.wish-search-row { display: flex; gap: 8px; margin-bottom: 14px; }
.wish-search-row input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px;
  border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13px;
}
.tabbar .tab span:last-child { font-size: 9.5px; }

/* 修改密码表单 */
.pwd-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.pwd-form .auth-field { display: block; margin-bottom: 10px; }
.pwd-form .auth-field span { display: block; margin-bottom: 5px; font-size: 11px; color: var(--muted); }
.pwd-form .auth-field input {
  width: 100%; height: 40px; padding: 0 11px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13px;
}

/* 截图识别：顶部显示上传的截图，方便核对 */
.nearby-shot {
  margin: 0 14px 10px;
  border-radius: 13px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  display: flex;
  justify-content: center;
  max-height: 36vh;
}
.nearby-shot img {
  width: 100%;
  max-height: 36vh;
  object-fit: contain;
  display: block;
}

/* 详情状态切换按钮 */
.detail-badge.action { cursor: pointer; }
.detail-badge.action:active { border-color: var(--amber); color: var(--amber); }

/* 想去卡片：打卡按钮 */
.spot-card { position: relative; }
.checkin-btn {
  position: absolute;
  right: 44px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(242, 189, 92, 0.55);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 700;
}
.checkin-btn:active { background: var(--amber); color: #18200f; }

/* 4 个 Tab 的布局 + 头部按钮 + 返回 */
.head-actions { display: flex; align-items: center; gap: 8px; }
.head-actions .btn { padding: 0 12px; min-height: 34px; font-size: 12px; }
.form-back {
  border: 0; background: transparent; color: var(--amber);
  font-size: 12px; font-weight: 700; padding: 0 0 6px;
}
.tabbar .tab span:last-child { font-size: 9.5px; }

/* 想去页：打卡进度 */
.wish-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(242, 189, 92, 0.35);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}
.wish-progress strong { font-size: 15px; }

/* 去过页常驻「记录一个地方」按钮 */
.fab-add {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + 18px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 1200;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 232, 178, 0.5);
  background: linear-gradient(150deg, #ffd47a, #e3a538);
  color: #1a1c14;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(211, 149, 43, 0.35);
}
.fab-add:active { transform: translateX(-50%) scale(0.97); }

/* 想去进度条 */
.wish-progress { display: block; }
.wish-progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wish-progress-top strong { font-size: 14px; }
.wish-progress-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(242, 189, 92, 0.18);
  overflow: hidden;
}
.wish-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd47a, #e3a538);
  transition: width 0.3s ease;
}


/* —— 想去进度：简洁进度条，数字在条内 —— */
.wish-progress {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
}
.wish-progress-bar {
  position: relative;
  height: 26px;
  border-radius: 999px;
  background: rgba(242, 189, 92, 0.16);
  border: 1px solid rgba(242, 189, 92, 0.28);
  overflow: hidden;
}
.wish-progress-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd47a, #e3a538);
  transition: width 0.35s ease;
}
.wish-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: #f6dda8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  letter-spacing: 0.02em;
}
.wish-progress-label b { font-size: 12.5px; }

/* —— 想去卡片：打卡按钮 —— */
.checkin-btn {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(150deg, #ffd47a, #e3a538);
  color: #1a1c14;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(211, 149, 43, 0.35);
}
.checkin-btn:active { transform: scale(0.96); }

/* 卡片底部标签留出打卡按钮空间 */
#wishList .spot-tags { padding-right: 88px; }


/* —— 想去进度：C 方案（文字+百分比+进度条） —— */
.wish-progress {
  display: block;
  margin: 0 0 14px;
  padding: 12px 13px;
  border-radius: 13px;
  border: 1px solid rgba(242, 189, 92, 0.32);
  background: var(--amber-soft);
}
.wish-progress.hidden { display: none; }
.wish-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 600;
}
.wish-progress-top strong { font-size: 15px; }
.wish-progress-bar {
  margin-top: 9px;
  height: 7px;
  border-radius: 999px;
  background: rgba(242, 189, 92, 0.2);
  overflow: hidden;
}
.wish-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd47a, #e3a538);
  transition: width 0.35s ease;
}

/* —— 打卡：小旗子图标按钮 —— */
.checkin-btn {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(242, 189, 92, 0.45);
  background: rgba(242, 189, 92, 0.14);
  color: var(--amber);
}
.checkin-btn svg { width: 17px; height: 17px; }
.checkin-btn:active { background: var(--amber); color: #1a1c14; }
#wishList .spot-tags { padding-right: 52px; }


/* 打卡旗子：更小、绿色 */
.checkin-btn {
  width: 32px;
  height: 32px;
  right: 12px;
  bottom: 10px;
  border: 1px solid rgba(127, 189, 139, 0.5);
  background: rgba(127, 189, 139, 0.16);
  color: #8fd39c;
}
.checkin-btn svg { width: 14px; height: 14px; }
.checkin-btn:active { background: rgba(127, 189, 139, 0.4); color: #0f2214; }
#wishList .spot-tags { padding-right: 48px; }


/* —— 筛选：下划线 Tab（去框） —— */
.filter-row {
  gap: 0;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.filter-chip {
  flex: none;
  padding: 6px 2px 9px;
  margin-right: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  position: relative;
}
.filter-chip.active {
  background: transparent;
  color: var(--amber);
}
.filter-chip.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
}

/* —— 卡片小标签：去框，改为文字 + 点分隔 —— */
.mini-tag,
.mini-tag.wish {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}
.mini-tag:not(:last-child)::after {
  content: " · ";
  color: var(--muted-2);
}
.spot-tags { gap: 0; }

/* —— 底部悬浮按钮避让列表 —— */
#spotList { padding-bottom: 96px; }


/* 卡片不再显示标签行，压缩一点高度 */
.spot-main { justify-content: center; gap: 6px; }
#wishList .checkin-btn { bottom: 12px; }


/* 记录按钮：底部固定栏，不再悬浮压卡片 */
.fab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + var(--safe-bottom));
  z-index: 1200;
  display: flex;
  justify-content: center;
  padding: 10px 16px 12px;
  background: linear-gradient(to top, var(--bg) 62%, rgba(10, 16, 12, 0));
  pointer-events: none;
}
.fab-bar .fab-add { pointer-events: auto; }
.fab-add {
  position: static;
  transform: none;
  width: min(320px, 100%);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(211, 149, 43, 0.32);
}
.fab-add:active { transform: scale(0.98); }
#spotList { padding-bottom: 116px; }


/* 底部动作栏改为实底，像导航栏的一部分，不再像浮层 */
.fab-bar {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 9px 16px 10px;
  box-shadow: none;
}
.fab-bar .fab-add {
  width: auto;
  min-width: 200px;
  padding: 12px 26px;
  box-shadow: 0 4px 12px rgba(211, 149, 43, 0.25);
}
#spotList { padding-bottom: 92px; }


/* 底部动作栏：按钮在栏内上下居中，不贴边 */
.fab-bar {
  min-height: 64px;
  align-items: center;
  padding: 14px 16px 16px;
}

/* 筛选 Tab 字号降一级 */
.filter-chip {
  font-size: 12px;
  font-weight: 500;
  margin-right: 24px;
}
.filter-chip.active { font-weight: 600; }


/* 进度改用绿色：绿色=已完成 */
.wish-progress {
  border-color: rgba(127, 189, 139, 0.35);
  background: rgba(127, 189, 139, 0.1);
}
.wish-progress-top { color: #9ad6a6; }
.wish-progress-bar { background: rgba(127, 189, 139, 0.18); }
.wish-progress-bar i { background: linear-gradient(90deg, #9ad6a6, #5f9f6d); }


/* 地图标记缩小 + 想去绿色 */
.camp-marker {
  width: 34px;
  height: 34px;
  border-width: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(242, 189, 92, 0.14);
}
.camp-marker::after {
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-width: 2px;
}
.camp-marker svg { width: 18px; height: 18px; }
.camp-marker.wish {
  background: linear-gradient(150deg, #a6e0b3, #5f9f6d);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(127, 189, 139, 0.25);
}
.camp-marker.wish::after { background: #5f9f6d; }
.camp-marker.marker-plain { width: 30px; height: 30px; }
.camp-marker.marker-plain .marker-emoji { font-size: 15px; }

/* 我的位置标签 */
.user-label {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(103, 183, 255, 0.5);
  background: rgba(10, 20, 30, 0.85);
  color: #9fd2ff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.user-label::before { display: none; }


/* 修改密码：账号卡片右上角锁形图标 */
.account-group { position: relative; }
.account-lock {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
.account-lock:active { border-color: var(--amber); color: var(--amber); }
.account-lock.open { border-color: rgba(242, 189, 92, 0.55); color: var(--amber); background: var(--amber-soft); }


/* 地图标记再缩小一点 */
.camp-marker { width: 28px; height: 28px; border-width: 2px; }
.camp-marker svg { width: 15px; height: 15px; }
.camp-marker::after { bottom: -5px; width: 8px; height: 8px; border-width: 2px; }
.camp-marker.marker-plain { width: 24px; height: 24px; }
.camp-marker.marker-plain .marker-emoji { font-size: 12px; }

/* 我的位置：小卡通人 */
.user-marker {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #5aa9f0, #2f7ad0);
  border: 2px solid #eaf6ff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.user-marker .dot { display: none; }
.user-marker .pulse {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(90, 169, 240, 0.35);
  animation: pulse 2s ease-out infinite;
}
.user-icon { position: relative; width: 15px; height: 15px; }


/* —— 地图：极小图钉 + 图例 —— */
.camp-marker {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid #0f1a12;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(150deg, #ffd57c, #e4a638);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.camp-marker::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: rgba(20, 30, 18, 0.55);
}
.camp-marker.wish {
  background: linear-gradient(150deg, #a6e0b3, #5f9f6d);
}
.camp-marker.wish::after { background: rgba(12, 40, 22, 0.55); }

/* 我的位置：蓝色图钉 + 小人 */
.user-marker {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid #eaf6ff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(160deg, #5aa9f0, #2f7ad0);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.45);
}
.user-marker .user-icon {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
}
.user-marker .pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(90, 169, 240, 0.3);
  animation: pulse 2s ease-out infinite;
}
.user-label {
  display: none;
}

/* 左下角图钉图例 */
.map-status .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.map-status .legend-item:last-child { margin-right: 0; }
.legend-pin {
  width: 9px;
  height: 9px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 1.5px solid rgba(12, 22, 15, 0.8);
  display: inline-block;
  flex: none;
}
.legend-pin.visited { background: #e4a638; }
.legend-pin.wish { background: #5f9f6d; }
.legend-pin.me { background: #4a9ae4; border-color: rgba(234, 246, 255, 0.9); }
.map-status { display: flex; align-items: center; gap: 0; }


/* 图钉内分类小图标（反向旋转回正） */
.camp-marker { display: grid; place-items: center; }
.camp-marker::after { display: none; }
.marker-glyph {
  transform: rotate(45deg);
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  color: #1a1c14;
}
.marker-glyph svg { width: 11px; height: 11px; }
.camp-marker.wish .marker-glyph { color: #0d2416; }


/* 打卡进度：琥珀外框 + 绿色分段（马赛克感） */
.wish-progress {
  padding: 13px 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(242, 189, 92, 0.45);
  background: rgba(242, 189, 92, 0.07);
}
.wish-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wish-progress-title {
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.wish-progress-percent {
  color: #9ad6a6;
  font-size: 14px;
  font-weight: 800;
}
.wish-progress-sub {
  margin: 2px 0 9px;
  color: var(--muted);
  font-size: 11.5px;
}
.wish-progress-sub strong { color: #cfcfc2; font-size: 12.5px; }
.wish-progress-bar {
  height: 14px;
  padding: 2px;
  border-radius: 7px;
  border: 1px solid rgba(242, 189, 92, 0.5);
  background: rgba(242, 189, 92, 0.16);
  overflow: hidden;
}
.wish-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background-image: repeating-linear-gradient(
    90deg,
    #5f9f6d 0 7px,
    rgba(95, 159, 109, 0.18) 7px 9px
  );
  transition: width 0.35s ease;
}


/* —— 启动加载动画 —— */
.splash {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, #182216 0%, #0b110d 65%);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash.is-hidden { opacity: 0; visibility: hidden; }
.splash-inner { display: grid; justify-items: center; gap: 10px; padding: 0 32px; }
.splash-logo {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(242, 189, 92, 0.2);
  animation: splashLogo 2.2s ease-in-out infinite;
}
.splash-logo img { width: 100%; height: 100%; display: block; }
.splash-title { margin: 6px 0 0; font-size: 22px; letter-spacing: 0.06em; color: #f4efe2; }
.splash-slogan { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.splash-paws { display: flex; gap: 8px; margin-top: 14px; }
.splash-paws span {
  font-size: 15px;
  opacity: 0.2;
  animation: pawStep 1.5s ease-in-out infinite;
}
.splash-paws span:nth-child(2) { animation-delay: 0.18s; }
.splash-paws span:nth-child(3) { animation-delay: 0.36s; }
@keyframes pawStep {
  0%, 100% { opacity: 0.18; transform: translateY(0); }
  40% { opacity: 0.95; transform: translateY(-3px); }
}
@keyframes splashLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* 作者署名 */
.settings-author {
  margin: 18px 0 8px;
  text-align: center;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.08em;
}


/* 加载页 logo 改为内联 SVG，避免图片延迟 */
.splash-logo { background: none; }
.splash-logo svg { width: 100%; height: 100%; display: block; }
.settings-author {
  margin: 12px 0 4px;
  text-align: center;
  color: rgba(236, 231, 216, 0.6);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}


/* 内测版刷新按钮 */
.preview-refresh {
  position: fixed;
  right: 12px;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 14px);
  z-index: 1300;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(242, 189, 92, 0.45);
  background: rgba(20, 26, 18, 0.92);
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.preview-refresh:active { background: rgba(242, 189, 92, 0.2); }


/* 加载页：白底 + 小狗奔跑 */
.splash {
  background: linear-gradient(180deg, #fffdf7 0%, #fbf3e6 100%);
}
.splash-title { color: #2b2a22; }
.splash-slogan { color: #8d8574; }
.splash-logo {
  box-shadow: 0 16px 40px rgba(180, 140, 70, 0.28), 0 0 0 1px rgba(242, 189, 92, 0.35);
}
.splash-dog {
  transform-box: fill-box;
  transform-origin: 50% 80%;
  animation: dogRun 0.55s ease-in-out infinite;
}
@keyframes dogRun {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(1.5px, -2.5px) rotate(-3deg); }
  65% { transform: translate(-1.5px, -0.5px) rotate(3deg); }
}
.splash-paws span { filter: saturate(0.2) brightness(0.4); }


.splash-loading {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #a39b88;
  letter-spacing: 0.04em;
}


/* 爪印改为 SVG 并依次点亮 */
.splash-paws { gap: 10px; margin-top: 16px; }
.splash-paws svg {
  width: 15px;
  height: 15px;
  fill: #b8ab8f;
  opacity: 0.25;
  animation: pawStep 1.4s ease-in-out infinite;
}
.splash-paws svg:nth-child(2) { animation-delay: 0.16s; }
.splash-paws svg:nth-child(3) { animation-delay: 0.32s; }
.splash-paws span { display: none; }

.splash-dog {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  animation: dogRun 0.6s ease-in-out infinite;
}
@keyframes dogRun {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  35% { transform: translateY(-2.6px) rotate(2deg); }
  70% { transform: translateY(-0.6px) rotate(0deg); }
}


/* 加载页：单枚爪印从左走到右 */
.splash-paws { gap: 0; margin-top: 16px; width: 64px; height: 18px; display: flex; justify-content: center; }
.splash-paws svg {
  width: 16px;
  height: 16px;
  fill: #b8ab8f;
  opacity: 0;
  animation: pawWalk 1.6s linear infinite;
}
@keyframes pawWalk {
  0% { transform: translateX(-30px) rotate(-8deg); opacity: 0; }
  15% { opacity: 0.85; }
  50% { transform: translateX(0) rotate(0deg); opacity: 0.95; }
  85% { opacity: 0.6; }
  100% { transform: translateX(30px) rotate(6deg); opacity: 0; }
}

/* 加载页：小狗 emoji 跑动 */
.splash-dog {
  transform-box: fill-box;
  transform-origin: 50% 90%;
  animation: dogHop 0.7s ease-in-out infinite;
}
@keyframes dogHop {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  40% { transform: translateY(-3px) rotate(2deg); }
  70% { transform: translateY(-1px) rotate(-1deg); }
}


/* 加载页：爪印与文案拉开距离，避免重叠 */
.splash-paws {
  height: 20px;
  margin: 20px 0 0;
  align-items: center;
}
.splash-loading {
  margin: 12px 0 0;
  line-height: 1.4;
}


/* 极简加载页：真实 App 图标 + 三点加载 */
.splash-inner { gap: 12px; }
.splash-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(160, 120, 50, 0.28), 0 0 0 1px rgba(242, 189, 92, 0.35);
}
.splash-title { margin-top: 4px; }
.splash-dots { display: flex; gap: 7px; margin-top: 10px; }
.splash-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c8b48a;
  animation: splashDot 1.1s ease-in-out infinite;
}
.splash-dots i:nth-child(2) { animation-delay: 0.15s; }
.splash-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes splashDot {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}


/* 小狗奔跑：侧影弹跳 */
.splash-dog { animation: dogDash 0.5s ease-in-out infinite; }
@keyframes dogDash {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  45% { transform: translate(0.6px, -1.8px) rotate(-2deg); }
}

/* 狗的足迹：5 枚交替，从左到右依次亮起 */
.splash-trail {
  position: relative;
  width: 128px;
  height: 24px;
  margin: 16px auto 0;
}
.splash-trail i {
  position: absolute;
  width: 13px;
  height: 13px;
  opacity: 0;
  animation: pawBlink 1.5s ease-in-out infinite;
}
.splash-trail i svg { width: 100%; height: 100%; fill: #bfae8d; display: block; }
.splash-trail i:nth-child(1) { left: 0;    top: 10px; animation-delay: 0s; }
.splash-trail i:nth-child(2) { left: 26px; top: 1px;  animation-delay: 0.18s; }
.splash-trail i:nth-child(3) { left: 52px; top: 10px; animation-delay: 0.36s; }
.splash-trail i:nth-child(4) { left: 78px; top: 1px;  animation-delay: 0.54s; }
.splash-trail i:nth-child(5) { left: 104px; top: 10px; animation-delay: 0.72s; }
@keyframes pawBlink {
  0% { opacity: 0; }
  15% { opacity: 0.9; }
  55% { opacity: 0.75; }
  85% { opacity: 0; }
  100% { opacity: 0; }
}


/* 狗形剪影：emoji 去色成黑色，做奔跑弹跳 */
.splash-dog {
  filter: brightness(0) !important;
  animation: dogDash 0.55s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 90%;
}


/* 爪印方向：脚尖朝右（跟随从左到右的行走方向） */
.splash-trail i svg { transform: rotate(90deg); }
.splash-trail i:nth-child(odd) svg { transform: rotate(84deg); }
.splash-trail i:nth-child(even) svg { transform: rotate(96deg); }


/* 加载页细节：图标更大、爪印更清楚 */
.splash-icon {
  width: 104px;
  height: 104px;
  border-radius: 26px;
}
.splash-title { font-size: 23px; }
.splash-slogan { font-size: 12.5px; }
.splash-trail {
  width: 156px;
  height: 26px;
  margin-top: 18px;
}
.splash-trail i { width: 16px; height: 16px; }
.splash-trail i:nth-child(1) { left: 0;    top: 11px; }
.splash-trail i:nth-child(2) { left: 32px; top: 1px; }
.splash-trail i:nth-child(3) { left: 64px; top: 11px; }
.splash-trail i:nth-child(4) { left: 96px; top: 1px; }
.splash-trail i:nth-child(5) { left: 128px; top: 11px; }
.splash-trail i svg { fill: #b0a07e; }


/* 启动页：SVG 图标（静态 + 狗的微动作） */
.splash-art { width: 104px; height: 104px; filter: drop-shadow(0 16px 30px rgba(160,120,50,.28)); }
.splash-art svg { width: 100%; height: 100%; display: block; }

.splash-eyes {
  transform-box: fill-box;
  transform-origin: 50% 55%;
  animation: dogBlink 4.2s ease-in-out infinite;
}
@keyframes dogBlink {
  0%, 88%, 100% { transform: scaleY(1); }
  91% { transform: scaleY(0.08); }
  94% { transform: scaleY(1); }
}

.splash-tongue {
  transform-box: fill-box;
  transform-origin: 50% 10%;
  animation: dogPant 2.4s ease-in-out infinite;
}
@keyframes dogPant {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(1.5px) scaleY(1.06); }
}

.splash-tail {
  transform-box: fill-box;
  transform-origin: 92% 70%;
  animation: dogTail 1.5s ease-in-out infinite;
}
@keyframes dogTail {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg); }
}


/* 让眨眼在 1.5 秒展示期内至少发生两次 */
.splash-eyes { animation: dogBlink 2s ease-in-out infinite; }
@keyframes dogBlink {
  0% { transform: scaleY(1); }
  14% { transform: scaleY(0.08); }
  20% { transform: scaleY(1); }
  62% { transform: scaleY(1); }
  68% { transform: scaleY(0.08); }
  74% { transform: scaleY(1); }
  100% { transform: scaleY(1); }
}


/* 眨眼与尾巴同节奏（1.5s），相位错开 */
.splash-eyes { animation: dogBlink 1.5s ease-in-out infinite; }
@keyframes dogBlink {
  0%, 26% { transform: scaleY(1); }
  34% { transform: scaleY(0.05); }
  42% { transform: scaleY(1); }
  100% { transform: scaleY(1); }
}
.splash-tail {
  animation: dogTail 1.5s ease-in-out infinite;
  animation-delay: -0.75s;
}


/* 设置页底部：卡通平毛巡回猎犬（白底圆） */
.settings-footer { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-dog {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(242, 189, 92, 0.25);
  margin-bottom: 2px;
}
.footer-dog svg { width: 100%; height: 100%; display: block; }
.footer-dog-inline { color: var(--amber); font-weight: 700; }


.footer-dog { width: 64px; height: 64px; }


/* 设置页底部：行内的小九九头像 */
.footer-dog {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: #fffaf0;
  vertical-align: -8px;
  margin-left: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.footer-dog svg { width: 100%; height: 100%; display: block; }


/* 设置页底部：九九真人照片头像 */
.footer-dog {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 250, 240, 0.9);
  vertical-align: -9px;
  margin-left: 5px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  background: #fffaf0;
}


/* 设置页底部：卡通平毛巡回猎犬（白底圆，位于文字上方） */
.footer-dog {
  display: block;
  width: 64px;
  height: 64px;
  margin: 2px auto 4px;
  border-radius: 50%;
  overflow: hidden;
  background: #fdf8ee;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(242, 189, 92, 0.25);
}
.footer-dog svg { width: 100%; height: 100%; display: block; }


/* 检查更新：有新版时高亮 */
.version-text.has-update,
#versionText.has-update {
  color: var(--amber);
  font-weight: 700;
}
