/* ═══ 酒鬼地图 · 设计系统 ═══ */
:root {
  --bg: #0d0f14;
  --panel: rgba(22, 25, 36, .82);
  --panel-solid: #161a24;
  --card: rgba(255, 255, 255, .045);
  --border: rgba(255, 255, 255, .09);
  --text: #ecedf3;
  --text-2: #9aa0b4;
  --text-3: #6b7186;
  --accent: #f0506e;
  --accent-2: #e0324f;
  --accent-soft: rgba(240, 80, 110, .14);
  --accent-glow: rgba(240, 80, 110, .35);
  --gold: #f5b83d;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
}
/* 琥珀墨绿 */
:root[data-theme="amber"] {
  --bg: #0e120d;
  --panel: rgba(22, 28, 20, .82);
  --panel-solid: #161d14;
  --accent: #e8a33d;
  --accent-2: #c97c1e;
  --accent-soft: rgba(232, 163, 61, .14);
  --accent-glow: rgba(232, 163, 61, .35);
  --gold: #ffd666;
}
/* 克莱因蓝 */
:root[data-theme="blue"] {
  --bg: #0b0e16;
  --panel: rgba(18, 22, 38, .82);
  --panel-solid: #131728;
  --accent: #4f7df7;
  --accent-2: #2b55d9;
  --accent-soft: rgba(79, 125, 247, .14);
  --accent-glow: rgba(79, 125, 247, .35);
  --gold: #f5b83d;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.spacer { flex: 1; }

/* ── 控件 ── */
button {
  cursor: pointer; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; background: var(--card); color: var(--text);
  font-size: 14px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: all .2s ease;
}
button:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
button:active { transform: scale(.97); }
button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none;
  box-shadow: 0 4px 16px var(--accent-glow);
}
button.primary:hover { box-shadow: 0 6px 20px var(--accent-glow); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
button.danger { background: rgba(224, 50, 79, .15); border-color: rgba(224, 50, 79, .4); color: #ff8fa3; }
input, select, textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .05);
  color: var(--text); font-size: 14px; outline: none; transition: border .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=file] { padding: 6px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
select option { background: var(--panel-solid); }
label { display: block; margin: 10px 0 4px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
label input, label select, label textarea { margin-top: 5px; }
hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.error { color: #ff8fa3; font-size: 13px; margin-top: 8px; min-height: 18px; }
.hint { font-size: 12px; color: var(--text-3); margin: 8px 0; line-height: 1.6; }
.row { display: flex; gap: 10px; }
.row > label { flex: 1; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── 登录页 ── */
#auth-view {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, var(--accent-soft), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(79, 195, 247, .08), transparent),
    var(--bg);
}
.auth-card {
  width: 340px; background: var(--panel); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: 36px; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 26px; letter-spacing: -0.02em; }
.subtitle { color: var(--text-2); font-size: 13px; margin: 8px 0 20px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: rgba(255,255,255,.05); padding: 4px; border-radius: 12px; }
.auth-tabs button { flex: 1; border: none; background: transparent; }
.auth-tabs button.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 2px 10px var(--accent-glow); }
.auth-card input { margin-bottom: 12px; }
.auth-card .primary { width: 100%; padding: 11px; }

/* ── 主界面框架 ── */
#app-view { height: 100vh; display: flex; flex-direction: column; }
header {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--panel); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border); position: relative; z-index: 600;
}
.logo { font-weight: 700; font-size: 16px; white-space: nowrap; letter-spacing: -0.01em; }
#me-name { color: var(--text-2); font-size: 13px; }
main { flex: 1; display: flex; min-height: 0; position: relative; }
aside {
  width: 310px; background: var(--panel); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 500;
}
.sheet-handle { display: none; }
.side-tabs { display: flex; padding: 8px 8px 0; gap: 4px; }
.side-tabs button { flex: 1; border-radius: 10px 10px 0 0; padding: 10px 0; border: none; background: transparent; color: var(--text-2); }
.side-tabs button.active { background: rgba(255,255,255,.06); color: var(--accent); font-weight: 600; }
.panel { flex: 1; overflow-y: auto; padding: 14px; }
#map { flex: 1; background: #0d0f14; }

/* 地图（高德瓦片；CartoDB 在国内被墙，不再使用） */
.leaflet-container { background: #0d0f14; }
/* 深色模式 = 浅色瓦片反色滤镜（经典 dark-mode 配方） */
.tile-dark { filter: invert(92%) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6); }
/* Leaflet 控件深色化 */
.leaflet-bar a { background: var(--panel-solid) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-bar a:hover { background: rgba(255,255,255,.12) !important; }
.leaflet-control-layers {
  background: var(--panel-solid) !important; color: var(--text) !important;
  border: 1px solid var(--border) !important; border-radius: 10px !important; box-shadow: var(--shadow) !important;
}
.leaflet-control-layers-selector { vertical-align: -2px; }
.leaflet-control-attribution { background: rgba(13,15,20,.7) !important; color: var(--text-3) !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }

/* Leaflet 弹窗深色化 */
.leaflet-popup-content-wrapper {
  background: rgba(22, 25, 36, .95) !important; color: var(--text) !important;
  border-radius: 14px !important; border: 1px solid var(--border);
  box-shadow: var(--shadow) !important; backdrop-filter: blur(20px);
}
.leaflet-popup-tip { background: rgba(22, 25, 36, .95) !important; border: 1px solid var(--border); }
.leaflet-popup-close-button { color: var(--text-2) !important; }

/* ── 搜索下拉 ── */
.search-wrap { position: relative; width: 340px; }
.search-wrap::before {
  content: '🔍'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: .55; z-index: 1; pointer-events: none;
}
#search-input {
  padding-left: 34px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18);
  transition: all .25s ease;
  animation: search-hint 2.4s ease-in-out 3;
}
@keyframes search-hint {
  0%, 100% { border-color: rgba(255, 255, 255, .18); }
  50% { border-color: var(--accent); }
}
#search-input:focus {
  background: rgba(255, 255, 255, .12); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 4px 18px var(--accent-glow);
}
#search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; z-index: 700; box-shadow: var(--shadow);
}
.search-item { padding: 11px 14px; cursor: pointer; transition: background .15s; }
.search-item:hover { background: rgba(255, 255, 255, .06); }
.search-item .s-name { font-weight: 600; font-size: 14px; }
.search-item .s-addr { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item.none { color: var(--text-3); cursor: default; }

/* ── 地图标记（emoji 徽章） ── */
.bar-marker { background: none; border: none; }
.bar-marker span {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--mc, #e94560); font-size: 17px;
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5), 0 0 14px var(--mc, #e94560);
  transition: transform .15s ease;
}
.bar-marker:hover span { transform: scale(1.18); }
.bar-marker.want span { background: rgba(20, 22, 32, .85); border-style: dashed; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }

/* ── 图层 ── */
.layer-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; transition: background .15s; }
.layer-item:hover { background: rgba(255,255,255,.04); }
.layer-item input { width: auto; accent-color: var(--accent); }
.layer-item .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
.layer-item .count { margin-left: auto; color: var(--text-3); font-size: 12px; }
.legend { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--text-2); }
.legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.legend .lg.been { background: #bbb; }
.legend .lg.want { border: 2px dashed #bbb; }

/* ── 标记列表 ── */
.filter-chips { display: flex; gap: 6px; margin-bottom: 12px; }
.filter-chips button { padding: 6px 12px; font-size: 12.5px; border-radius: 999px; }
.filter-chips button.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.spot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 12px; background: var(--card);
  border: 1px solid transparent; margin-bottom: 8px; cursor: pointer; transition: all .18s;
}
.spot-item:hover { background: rgba(255,255,255,.08); border-color: var(--border); transform: translateX(3px); }
.spot-text { flex: 1; min-width: 0; }
.spot-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.spot-item .name { font-weight: 600; font-size: 14px; }
.spot-item .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.spot-item .stars { color: var(--gold); }
.list-search { margin-bottom: 10px; }
.city-head { font-size: 12px; font-weight: 700; color: var(--text-2); margin: 14px 2px 6px; letter-spacing: .02em; }

/* ── 好友 ── */
.accept-row { display: flex; gap: 8px; }
.friend-item { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 10px; }
.friend-item:hover { background: rgba(255,255,255,.04); }
.friend-item .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.friend-item button { margin-left: auto; padding: 4px 12px; font-size: 12px; }
#invite-result { margin-top: 12px; }
#invite-result input { margin-bottom: 8px; font-size: 12px; }

/* ── 弹窗 ── */
.modal {
  position: fixed; inset: 0; background: rgba(5, 6, 10, .65);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-card {
  width: 430px; max-height: 90vh; overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 18px; padding: 26px; box-shadow: var(--shadow);
}
.modal-card h2 { font-size: 18px; margin-bottom: 12px; letter-spacing: -0.01em; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.coords { color: var(--text-3); font-size: 12px; margin-top: 10px; }
.status-toggle { display: flex; gap: 8px; background: rgba(255,255,255,.05); padding: 4px; border-radius: 12px; }
.status-toggle button { flex: 1; padding: 10px 0; border: none; background: transparent; }
.status-toggle button.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 2px 10px var(--accent-glow); }

/* ── 照片 ── */
#photo-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-thumb { position: relative; width: 72px; height: 72px; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.photo-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: var(--accent); border: none; font-size: 12px; line-height: 1; }
#photo-viewer img { max-width: 92vw; max-height: 92vh; border-radius: 12px; box-shadow: var(--shadow); }

/* ── 工具行 / 动态横幅 / 酒鬼清单海报 / 统计 ── */
.tool-row { display: flex; gap: 8px; margin-top: 16px; }
.tool-row button { flex: 1; }
#news-banner {
  background: rgba(245, 184, 61, .1); border: 1px solid rgba(245, 184, 61, .3);
  color: #f5d78a; padding: 10px 12px; border-radius: 12px; font-size: 13px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
#news-banner button { margin-left: auto; padding: 3px 10px; font-size: 12px; background: rgba(245, 184, 61, .2); border: none; color: #f5d78a; }
.poster-card {
  width: min(96vw, 520px); max-height: 92vh; display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
}
.poster-controls { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.poster-controls select { width: auto; }
#poster-canvas { overflow: auto; background: #0f1219; border-radius: 12px; min-height: 0; }
#poster-canvas svg { display: block; width: 100%; height: auto; }
#poster-img-wrap { margin-top: 12px; }
#poster-img { max-width: 100%; border-radius: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 8px; text-align: center; font-size: 12px; color: var(--text-2);
}
.stat .num {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--gold)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.rank-card {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(245,184,61,.08));
  border: 1px solid var(--accent-soft); border-radius: 14px; padding: 14px 16px;
}
.rank-badge { font-size: 30px; }
.rank-title { font-weight: 700; font-size: 16px; }
.rank-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── 地图弹窗内容 ── */
.leaflet-popup-content { font-size: 13px; }
.popup-title { font-weight: 700; font-size: 15px; }
.popup-meta { color: var(--text-2); margin: 3px 0; }
.popup-actions { margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.popup-actions a, .popup-actions button {
  font-size: 12.5px; color: var(--accent); text-decoration: none;
  background: none; border: none; padding: 0; cursor: pointer; font-weight: 500;
}
.popup-actions a:hover { text-decoration: underline; }

/* ── 庆祝动效 & 轻提示 ── */
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 2000; overflow: hidden; }
.celebrate span { position: absolute; top: -8vh; animation: celebrate-fall linear forwards; will-change: transform; }
@keyframes celebrate-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(115vh) rotate(340deg); opacity: 0; }
}
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px);
  background: var(--panel-solid); border: 1px solid var(--border); color: var(--text);
  padding: 11px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; transition: all .3s cubic-bezier(.22, 1, .36, 1); z-index: 2001; pointer-events: none;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 标记聚合气泡（🍻 + 数量角标） ── */
.bar-cluster { background: none; border: none; }
.bar-cluster span {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(22, 25, 36, .92); font-size: 21px;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .5), 0 0 16px var(--accent-glow);
  backdrop-filter: blur(8px);
}
.bar-cluster i {
  position: absolute; top: -5px; right: -5px; font-style: normal;
  min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── 动态（时间线） ── */
.feed-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border-radius: 12px; background: var(--card);
  border: 1px solid transparent; margin-bottom: 8px; cursor: pointer; transition: all .18s;
}
.feed-item:hover { background: rgba(255,255,255,.08); border-color: var(--border); transform: translateX(3px); }
.feed-item .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
.feed-item .feed-text { min-width: 0; font-size: 13.5px; line-height: 1.5; }
.feed-item .meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.feed-item .stars { color: var(--gold); }

/* ── 主题切换 ── */
.theme-row { display: flex; gap: 10px; margin-top: 4px; }
.theme-dot {
  width: 28px; height: 28px; border-radius: 50%; padding: 0;
  background: var(--tc); border: 2px solid transparent;
}
.theme-dot.active { border-color: #fff; box-shadow: 0 0 10px var(--tc); }

/* ── 照片查看器 ── */
.viewer-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 1002;
  width: 46px; height: 46px; border-radius: 50%; font-size: 26px; line-height: 1;
  background: rgba(22, 25, 36, .8); border: 1px solid var(--border); padding: 0;
}
#viewer-prev { left: max(4vw, 12px); }
#viewer-next { right: max(4vw, 12px); }
.viewer-counter {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  background: rgba(22, 25, 36, .8); border: 1px solid var(--border);
  padding: 4px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2); z-index: 1002;
}

/* ── 新用户引导 ── */
#onboard {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(5, 6, 10, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
}
.onboard-card {
  margin-top: 96px; text-align: center; padding: 22px 30px;
  background: var(--panel-solid); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.onboard-arrow { font-size: 30px; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.onboard-title { font-size: 17px; font-weight: 700; margin: 8px 0 6px; }
.onboard-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }

/* ── 手机端底部导航（桌面隐藏） ── */
.bottom-nav { display: none; }

/* ── 手机端：底部抽屉 ── */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    background: var(--panel); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav button {
    flex: 1; border: none; background: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
    padding: 7px 0 5px; font-size: 19px; line-height: 1.2;
    display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--text-2);
  }
  .bottom-nav button:hover { background: none; transform: none; }
  .bottom-nav button span { font-size: 10.5px; }
  .bottom-nav button.active { color: var(--accent); }

  header { padding: 8px 10px; gap: 8px; }
  .logo { font-size: 14px; }
  /* 手机端：搜索框悬浮在地图上方（地图 App 的标准位置） */
  .search-wrap {
    position: absolute; top: calc(100% + 8px); left: 10px; right: 10px;
    width: auto; min-width: 0; z-index: 700;
  }
  #search-input {
    background: rgba(22, 25, 36, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .2);
    padding-top: 11px; padding-bottom: 11px; font-size: 15px;
  }
  #me-name { display: none; }
  #map { position: absolute; inset: 0; width: 100%; }
  aside {
    position: absolute; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); width: 100%; z-index: 800;
    max-height: 52vh; border-radius: 22px 22px 0 0; border-right: none;
    border-top: 1px solid var(--border); box-shadow: 0 -10px 44px rgba(0, 0, 0, .6);
  }
  .sheet-handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28); margin: 8px auto 2px; cursor: pointer; }
  /* 手机端用底部导航，隐藏抽屉里的 tab 栏 */
  .side-tabs { display: none; }
  aside.collapsed .panel { display: none; }
  aside.collapsed { max-height: none; }
  .panel { padding: 12px 14px; }
  .spot-item { padding: 14px; }
  .layer-item { padding: 10px 6px; }
  .friend-item { padding: 11px 6px; }
  .onboard-card { margin-top: 140px; } /* 别挡住悬浮搜索框 */
  /* ± 缩放按钮挪到悬浮搜索框下面；版权条抬到底部导航上方 */
  .leaflet-top { top: 108px; }
  .leaflet-bottom { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .leaflet-control-attribution { font-size: 10px; }

  /* 弹窗在手机端从底部滑出 */
  .modal { align-items: flex-end; }
  .modal-card {
    width: 100%; border-radius: 22px 22px 0 0; max-height: 88vh;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: sheet-up .28s cubic-bezier(.22, 1, .36, 1);
  }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  .poster-card { width: 100%; border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheet-up .28s cubic-bezier(.22, 1, .36, 1); }

  /* 地图弹窗别占满 */
  .leaflet-popup-content-wrapper { max-width: 78vw; }
}
