﻿/* =========================================================
 * 烟火地图 · 样式
 * ========================================================= */

:root {
  --paper: #f6f1e7;
  --paper-2: #efe8da;
  --ink: #221c16;
  --ink-2: #574c3f;
  --muted: #8b7f6d;
  --line: rgba(66, 53, 38, 0.12);
  --line-strong: rgba(66, 53, 38, 0.2);
  --flame: #e8552f;
  --flame-deep: #c2410c;
  --glass: rgba(255, 252, 246, 0.84);
  --glass-strong: rgba(255, 253, 248, 0.96);
  --shadow-lg: 0 24px 60px -24px rgba(56, 40, 22, 0.38), 0 2px 8px rgba(56, 40, 22, 0.05);
  --shadow-md: 0 12px 30px -16px rgba(56, 40, 22, 0.4);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(232, 85, 47, 0.22);
}

/* ---------------- 地图画布 ---------------- */

.map {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, #fcf8f0 0%, #f1eadc 55%, #e6dcc8 100%);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.map:active {
  cursor: grabbing;
}

.tile-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: saturate(0.92) contrast(0.98) brightness(1.01);
}

.map-tile {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  user-select: none;
}

.overlay-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.marker-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* ---------------- 通用面板 ---------------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-lg);
}

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px 9px 10px;
  border-radius: 20px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f97316, #e11d48);
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(225, 29, 72, 0.75);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.brand-text h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.2;
}

.brand-text p {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.brand-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  line-height: 1;
}

.brand-stat strong {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.brand-stat span {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  transition: transform 0.18s var(--ease), color 0.18s, background 0.18s;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
}

.icon-btn:active {
  transform: translateY(0);
}

.icon-btn.is-active {
  background: linear-gradient(140deg, #f97316, #e11d48);
  color: #fff;
  border-color: transparent;
}

.icon-btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  width: 36px;
  height: 36px;
  color: var(--muted);
}

.icon-btn.ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.icon-btn.sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.select-wrap {
  height: 42px;
  display: flex;
  align-items: center;
  border-radius: 14px;
  padding: 0 4px 0 2px;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  height: 100%;
  padding: 0 26px 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b7f6d' stroke-width='2.2'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.primary-btn {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2653c 0%, #e11d48 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 14px 26px -12px rgba(225, 29, 72, 0.8);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
  white-space: nowrap;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -12px rgba(225, 29, 72, 0.85);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn.block {
  width: 100%;
}

.mobile-only {
  display: none;
}

/* ---------------- 搜索与列表 ---------------- */

.sidebar {
  position: fixed;
  top: 96px;
  left: 18px;
  bottom: 96px;
  width: 344px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
}

.sidebar-head {
  padding: 14px 14px 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  transition: border-color 0.18s, background 0.18s;
}

.search:focus-within {
  border-color: rgba(232, 85, 47, 0.45);
  background: rgba(255, 255, 255, 0.85);
}

.search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12.5px;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search input::placeholder {
  color: #a99d8b;
}

.search-clear {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
  font-size: 10px;
  display: grid;
  place-items: center;
  padding: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.chip {
  height: 27px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink-2);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.9);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.list-meta {
  padding: 8px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid transparent;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--flame-deep);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.link-btn.danger {
  color: #b91c1c;
}

.event-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(66, 53, 38, 0.2) transparent;
}

.event-list::-webkit-scrollbar {
  width: 8px;
}

.event-list::-webkit-scrollbar-thumb {
  background: rgba(66, 53, 38, 0.16);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line);
}

.event-item.is-active {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(232, 85, 47, 0.28);
  box-shadow: inset 0 0 0 1px rgba(232, 85, 47, 0.08);
}

.event-item:active {
  transform: scale(0.995);
}

.ei-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ei-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 1px;
}

.ei-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ei-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ei-heat {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--flame-deep);
  background: rgba(232, 85, 47, 0.1);
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 1.2;
}

.ei-heat::before {
  content: "🔥";
  font-size: 9px;
  margin-right: 2px;
}

.ei-meta {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ei-cat {
  color: var(--cat);
  font-weight: 650;
}

.list-empty {
  padding: 34px 18px;
  text-align: center;
}

.list-empty strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.list-empty p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}

.list-hint {
  margin: 8px 4px 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed var(--line-strong);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

.sidebar-foot {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
}

.zoom-hint {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.foot-actions {
  display: flex;
  gap: 10px;
}

/* ---------------- 标记 ---------------- */

.marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  will-change: transform;
  transition: opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.marker.is-off {
  opacity: 0;
  pointer-events: none;
}

.m-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 28px);
  height: var(--size, 28px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: calc(var(--size, 28px) * 0.42);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  box-shadow:
    0 0 0 2px rgba(255, 253, 248, 0.95),
    0 7px 16px -5px rgba(30, 20, 10, 0.45);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
}

.marker:hover .m-dot {
  transform: translate(-50%, -50%) scale(1.14);
}

.marker.is-active .m-dot {
  box-shadow:
    0 0 0 3px #fffdf8,
    0 0 0 6px var(--cat),
    0 10px 22px -6px rgba(30, 20, 10, 0.5);
}

.marker.is-hot .m-halo {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--size, 28px) * 2.4);
  height: calc(var(--size, 28px) * 2.4);
  margin: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cat) 0%, transparent 66%);
  opacity: 0.2;
  transform: translate(-50%, -50%);
  animation: halo-pulse 3s ease-out infinite;
  pointer-events: none;
}

@keyframes halo-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0.22;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.25);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.25);
    opacity: 0;
  }
}

.m-label {
  position: absolute;
  left: calc(var(--size, 28px) / 2 + 7px);
  top: 0;
  transform: translateY(-50%);
  max-width: 158px;
  padding: 4px 9px;
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(66, 53, 38, 0.07);
  box-shadow: 0 8px 20px -10px rgba(30, 20, 10, 0.5);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.marker.show-label .m-label {
  opacity: 1;
}

.marker.is-active .m-label {
  opacity: 1;
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}

/* 我的位置 */
.me-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 2000;
  pointer-events: none;
}

.me-dot::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35), 0 4px 12px rgba(37, 99, 235, 0.4);
}

.me-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.18);
  animation: me-pulse 2.4s ease-out infinite;
}

@keyframes me-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}

/* ---------------- 地图控件 / 图例 / 状态 ---------------- */

.map-controls {
  position: fixed;
  right: 22px;
  bottom: 108px;
  z-index: 25;
  width: 44px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: right 0.35s var(--ease);
}

.map-controls button {
  width: 44px;
  height: 42px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 19px;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}

.map-controls button:last-child {
  border-bottom: 0;
}

.map-controls button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.7);
}

.map-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}

.map-controls svg {
  width: 18px;
  height: 18px;
}

.legend {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 13px;
  border-radius: 16px;
  transition: transform 0.35s var(--ease), left 0.35s var(--ease);
}

.legend-title {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.legend-items {
  display: flex;
  gap: 4px;
}

.lg-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.15;
  transition: background 0.2s, color 0.2s;
  cursor: default;
}

.lg-chip b {
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lg-chip i {
  font-style: normal;
  font-size: 9px;
}

.lg-chip.is-active {
  background: var(--ink);
  color: #fff;
}

.coord-chip {
  position: fixed;
  right: 22px;
  bottom: 52px;
  z-index: 24;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  transition: right 0.35s var(--ease);
}

.mobile-tier {
  display: none;
}

.attribution {
  position: fixed;
  right: 22px;
  bottom: 10px;
  z-index: 24;
  font-size: 9.5px;
  color: rgba(90, 76, 58, 0.6);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: right 0.35s var(--ease);
}

.map-status {
  position: absolute;
  left: 50%;
  top: 88px;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(34, 28, 22, 0.82);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  animation: blink 1.1s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ---------------- 点击地点卡 ---------------- */

.map-popup {
  position: absolute;
  z-index: 10;
  width: 300px;
  padding: 13px 14px 14px;
  border-radius: 17px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 24px 50px -22px rgba(40, 26, 12, 0.55), 0 2px 8px rgba(40, 26, 12, 0.08);
  transform: translate(-50%, calc(-100% - 14px));
  animation: pop-in 0.2s var(--ease);
}

.map-popup.is-below {
  transform: translate(-50%, 14px);
}

@keyframes pop-in {
  from {
    opacity: 0;
    margin-top: 6px;
  }
  to {
    opacity: 1;
    margin-top: 0;
  }
}

.map-popup::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: var(--glass-strong);
  border-right: 1px solid rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.75);
  transform: translateX(-50%) rotate(45deg);
}

.map-popup.is-below::after {
  top: -6px;
  bottom: auto;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.75);
}

.popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.popup-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.popup-head h3 {
  margin: 3px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.popup-list {
  margin: 10px 0 11px;
  max-height: 216px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.popup-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition: background 0.15s;
}

.popup-item:hover {
  background: rgba(66, 53, 38, 0.05);
}

.popup-item.is-muted {
  opacity: 0.55;
}

.pi-dot {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 13px;
  color: var(--cat);
  background: rgba(66, 53, 38, 0.06);
  background: color-mix(in srgb, var(--cat) 13%, transparent);
}

.pi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pi-title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pi-meta {
  font-size: 10px;
  color: var(--muted);
}

.popup-empty {
  margin: 4px 2px;
  padding: 12px 6px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------------- 详情抽屉 ---------------- */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 100vw;
  z-index: 40;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  backdrop-filter: blur(26px) saturate(1.3);
  border-left: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: -30px 0 70px -40px rgba(40, 26, 12, 0.6);
  transform: translateX(102%);
  transition: transform 0.38s var(--ease);
  display: flex;
  flex-direction: column;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  padding: 22px 22px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-kicker {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-body {
  padding: 6px 24px 20px;
  overflow-y: auto;
  flex: 1;
}

.d-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.d-cat {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(232, 85, 47, 0.1);
  color: var(--flame-deep);
}

.d-heat {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--flame-deep);
  font-variant-numeric: tabular-nums;
}

.drawer-body h2 {
  margin: 14px 0 8px;
  font-size: 25px;
  line-height: 1.28;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.d-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.d-desc {
  margin: 18px 0 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.d-desc.is-empty {
  color: #a99d8b;
  font-style: italic;
}

.d-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
  min-height: 44px;
}

.d-label {
  width: 44px;
  flex-shrink: 0;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.d-row code {
  font-size: 11.5px;
  color: var(--ink-2);
  background: rgba(66, 53, 38, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
}

.heat-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(66, 53, 38, 0.08);
  overflow: hidden;
}

.heat-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s var(--ease);
}

.heat-num {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--flame-deep);
}

.drawer-foot {
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.35);
}

.drawer-foot .primary-btn {
  flex: 1;
  height: 44px;
}

.ghost-btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.15s, border-color 0.15s;
}

.ghost-btn:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.ghost-btn.danger {
  color: #b91c1c;
}

body.drawer-open .map-controls,
body.drawer-open .coord-chip {
  right: 422px;
}

body.drawer-open .attribution {
  right: 422px;
}

@media (min-width: 1180px) {
  body.drawer-open .legend {
    left: calc(50% - 200px);
  }
}

/* ---------------- 弹窗表单 ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 24, 16, 0.42);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  padding: 24px 24px 22px;
  border-radius: 24px;
  background: #fffcf6;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 40px 100px -40px rgba(30, 18, 8, 0.7);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.26s var(--ease);
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.modal-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.field > span {
  font-size: 11.5px;
  color: var(--ink-2);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field > span b {
  color: var(--flame);
}

.field > span small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
  font-size: 10.5px;
}

.field input,
.field textarea {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.field textarea {
  height: auto;
  padding: 11px 13px;
  line-height: 1.7;
  resize: vertical;
  min-height: 76px;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(232, 85, 47, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 85, 47, 0.12);
}

.field input.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-btn {
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-2);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s;
}

.cat-btn:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.cat-btn.is-active {
  background: var(--cat);
  border-color: var(--cat);
  color: #fff;
  box-shadow: 0 8px 16px -8px var(--cat);
}

.cat-ico {
  font-size: 13px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-row input[type="range"] {
  flex: 1;
  height: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--flame);
  box-shadow: none;
}

.range-row output {
  width: 46px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(232, 85, 47, 0.1);
  color: var(--flame-deep);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.form-error {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  font-size: 12px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---------------- 帮助 ---------------- */

.help-modal {
  width: min(540px, 100%);
}

.help-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.help-list li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  align-items: baseline;
}

.help-list b {
  font-weight: 700;
  color: var(--ink);
}

.help-list span {
  color: var(--muted);
  line-height: 1.75;
}

.help-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.help-foot .primary-btn {
  margin-left: auto;
  height: 40px;
}

/* ---------------- Toast ---------------- */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(32, 24, 16, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s var(--ease);
  text-align: center;
}

.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-warn {
  background: rgba(146, 64, 14, 0.95);
}

/* ---------------- 侧栏标签 ---------------- */

.side-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  margin-bottom: 10px;
  background: rgba(66, 53, 38, 0.06);
  border-radius: 12px;
}

.side-tab {
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
}

.side-tab:hover {
  color: var(--ink-2);
}

.side-tab.is-active {
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 4px 10px -6px rgba(56, 40, 22, 0.4);
}

.tab-count {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(66, 53, 38, 0.1);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.side-tab.is-active .tab-count {
  background: rgba(232, 85, 47, 0.12);
  color: var(--flame-deep);
}

/* ---------------- 话题：作用范围 ---------------- */

.topic-scope {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(232, 85, 47, 0.055);
  border: 1px dashed rgba(232, 85, 47, 0.22);
}

.ts-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ts-top b {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.ts-source {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(232, 85, 47, 0.12);
  color: var(--flame-deep);
  white-space: nowrap;
}

.ts-source.is-demo {
  background: rgba(66, 53, 38, 0.08);
  color: var(--muted);
}

.ts-sub {
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------------- 话题列表 ---------------- */

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  text-align: left;
  transition: background 0.16s, border-color 0.16s;
}

.topic-item:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.ti-rank {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.16), rgba(225, 29, 72, 0.12));
  color: var(--flame-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ti-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ti-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ti-title {
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ti-score {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--flame-deep);
  font-variant-numeric: tabular-nums;
}

.ti-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 10px;
  color: var(--muted);
}

.ti-city {
  color: var(--ink-2);
  font-weight: 600;
}

.ti-plats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ti-plat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

.ti-plat i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
}

.topic-list-foot {
  padding: 10px 6px 2px;
  text-align: center;
  font-size: 9.5px;
  color: #a99d8b;
  letter-spacing: 0.02em;
}

.topic-update {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
  animation: blink 2.4s ease-in-out infinite;
}

/* ---------------- 话题地图标记 ---------------- */

.topic-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  will-change: transform;
  transition: opacity 0.25s ease;
  z-index: 1500;
}

.topic-marker.is-off {
  opacity: 0;
  pointer-events: none;
}

.tm-rank {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 28px);
  height: var(--size, 28px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, #fb923c 0%, #e11d48 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 0 2px rgba(255, 253, 248, 0.95),
    0 8px 18px -6px rgba(80, 30, 20, 0.55);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
}

.topic-marker:hover .tm-rank {
  transform: translate(-50%, -50%) scale(1.12);
}

.topic-marker.is-active .tm-rank {
  box-shadow:
    0 0 0 3px #fffdf8,
    0 0 0 6px #e11d48,
    0 10px 20px -6px rgba(80, 30, 20, 0.6);
}

.tm-label {
  position: absolute;
  left: calc(var(--size, 28px) / 2 + 7px);
  top: 0;
  transform: translateY(-50%);
  max-width: 170px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(34, 28, 22, 0.92);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.topic-marker:hover .tm-label,
.topic-marker.is-active .tm-label,
.topic-marker.show-label .tm-label {
  opacity: 1;
}

body.tab-topics .marker {
  opacity: 0;
  pointer-events: none;
}

/* ---------------- 详情：图片画廊 ---------------- */

.d-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0 4px;
}

.d-gallery.count-1 {
  grid-template-columns: 1fr;
}

.d-gallery.count-2 {
  grid-template-columns: 1fr 1fr;
}

.d-gallery.count-1 .gallery-item {
  aspect-ratio: 3 / 2;
}

.gallery-item {
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 11px;
  overflow: hidden;
  background: #e9e2d6;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* ---------------- 详情：平台贡献 ---------------- */

.d-platforms {
  margin: 14px 0 4px;
  padding: 12px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.platform-row {
  display: grid;
  grid-template-columns: 46px 26px 1fr 34px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.platform-row.is-empty {
  opacity: 0.4;
}

.p-name {
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
}

.p-weight {
  font-size: 9px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.p-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(66, 53, 38, 0.08);
  overflow: hidden;
}

.p-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--flame);
  transition: width 0.4s var(--ease);
}

.p-rank {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.p-formula {
  margin: 8px 0 0;
  font-size: 9px;
  line-height: 1.65;
  color: #a99d8b;
}

.p-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.p-link {
  font-size: 10.5px;
  font-weight: 650;
  text-decoration: none;
}

.p-link:hover {
  text-decoration: underline;
}

.p-no-link {
  font-size: 10px;
  color: #a99d8b;
}

/* ---------------- 表单：图片 ---------------- */

.image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 2px;
}

.image-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f0e9dd;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.image-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 18, 12, 0.62);
  color: #fff;
  font-size: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.image-remove:hover {
  background: rgba(185, 28, 28, 0.9);
}

.add-image-btn {
  width: fit-content;
  height: 34px;
  padding: 0 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.add-image-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(232, 85, 47, 0.4);
  color: var(--flame-deep);
}

.add-image-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.ei-cam {
  margin-left: 6px;
  font-size: 9px;
  color: var(--flame-deep);
  background: rgba(232, 85, 47, 0.08);
  padding: 1px 5px;
  border-radius: 999px;
}

/* ---------------- 图片灯箱 ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(14, 11, 8, 0.92);
  display: grid;
  place-items: center;
  padding: 44px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}

.lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lb-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lb-nav.prev {
  left: 20px;
}

.lb-nav.next {
  right: 20px;
}

.lb-count {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ---------------- 账号 ---------------- */

.account-btn {
  height: 42px;
  padding: 0 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: var(--shadow-md);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  max-width: 150px;
  transition: transform 0.18s var(--ease), color 0.18s;
}

.account-btn:hover {
  transform: translateY(-1px);
  color: var(--ink);
}

.account-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.account-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-btn.is-in {
  color: var(--ink);
  background: rgba(255, 252, 246, 0.94);
}

.account-menu {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 55;
  width: 180px;
  padding: 13px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.am-kicker {
  margin: 0;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.am-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu .ghost-btn {
  height: 34px;
  font-size: 11.5px;
}

.auth-modal {
  width: min(430px, 100%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  margin: 8px 0 4px;
  background: rgba(66, 53, 38, 0.06);
  border-radius: 11px;
}

.auth-tab {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.auth-tab.is-active {
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 4px 10px -6px rgba(56, 40, 22, 0.4);
}

.auth-hint {
  margin: 12px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-modal .modal-foot {
  margin-top: 16px;
}

.auth-modal .primary-btn.block {
  height: 44px;
  width: 100%;
}

/* ---------------- 评论 ---------------- */

.comments {
  margin: 16px 0 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.comments-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink);
}

.comment-count {
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(66, 53, 38, 0.08);
  color: var(--muted);
  font-size: 9.5px;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.comment-list {
  max-height: 250px;
  overflow-y: auto;
  margin-top: 4px;
  padding-right: 2px;
  scrollbar-width: thin;
}

.comment {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.comment:last-child {
  border-bottom: 0;
}

.comment-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.comment-author {
  font-size: 11px;
  color: var(--ink-2);
}

.comment-time {
  font-size: 9px;
  color: #a99d8b;
}

.comment-del {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 0;
  color: #b91c1c;
  font-size: 9.5px;
  cursor: pointer;
}

.comment-body {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 10.5px;
  color: #a99d8b;
  text-align: center;
}

.comment-form {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}

.comment-form input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
  outline: none;
}

.comment-form input:focus {
  border-color: rgba(232, 85, 47, 0.5);
}

.comment-form .primary-btn {
  height: 36px;
  padding: 0 12px;
  font-size: 11.5px;
  border-radius: 10px;
}

.comment-login {
  margin: 9px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.site-notice {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  max-width: min(720px, 90vw);
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(146, 64, 14, 0.92);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

/* 拖动/缩放时关闭毛玻璃和过渡，优先保证地图帧率 */
body.map-moving .glass {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

body.map-moving .marker,
body.map-moving .topic-marker,
body.map-moving .map-tile {
  transition: none !important;
}

body.map-moving .marker {
  box-shadow: none;
}

/* 缩放过程中先隐藏标记层，松手后再一次性归位，避免每帧重排 */
body.map-zooming .marker-layer {
  opacity: 0;
  transition: none;
}

body.map-zooming .map-tile {
  transition: none;
}

.primary-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.city-picker {
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  outline: none;
}

.city-picker:focus {
  border-color: var(--accent);
}

.ts-housing {
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.d-housing {
  margin: 12px 0 4px;
  padding: 10px 11px;
  border: 1px solid rgba(232, 85, 47, 0.18);
  border-radius: 10px;
  background: rgba(232, 85, 47, 0.045);
}

.d-housing-title {
  margin: 0 0 5px;
  font-size: 10px;
  color: var(--ink-faint);
}

.d-housing-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.d-housing-price small {
  margin-left: 3px;
  font-size: 9px;
  font-weight: 400;
  color: var(--ink-faint);
}

.d-housing-note {
  margin: 3px 0 0;
  font-size: 9px;
  color: var(--ink-faint);
}

.d-districts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.d-districts span {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-soft);
}

.d-districts b {
  font-weight: 600;
  color: var(--ink);
}

.icp-footer {
  padding: 7px 14px 10px;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.icp-footer a {
  color: inherit;
  text-decoration: none;
}

.icp-footer a:hover {
  color: var(--ink-soft);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1280px) {
  .legend-title {
    display: none;
  }
}

@media (max-width: 1180px) {
  .sidebar {
    width: 312px;
  }
}

@media (max-width: 860px) {
  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 8px;
  }

  .brand {
    padding: 7px 10px;
    gap: 9px;
    border-radius: 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand-mark svg {
    width: 21px;
    height: 21px;
  }

  .brand-text h1 {
    font-size: 15px;
    letter-spacing: 0.05em;
  }

  .brand-text p,
  .brand-stat,
  #btnLocate,
  #btnHelp,
  .select-wrap,
  .legend,
  .coord-chip {
    display: none;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .account-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
    justify-content: center;
  }

  .account-btn span {
    display: none;
  }

  .account-menu {
    top: 58px;
    right: 10px;
  }

  .primary-btn {
    height: 38px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 12px;
  }

  .mobile-only {
    display: grid;
  }

  .sidebar {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    width: auto;
    max-height: 64vh;
    border-radius: 22px;
    transform: translateY(calc(100% + 24px));
    transition: transform 0.36s var(--ease);
    z-index: 35;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 38px;
    height: 4px;
    margin-left: -19px;
    border-radius: 999px;
    background: rgba(66, 53, 38, 0.18);
    z-index: 3;
  }

  .sidebar-head {
    padding-top: 18px;
  }

  .sidebar.is-open {
    transform: translateY(0);
  }

  .map-controls {
    right: 12px;
    bottom: 74px;
  }

  .mobile-tier {
    display: block;
    position: fixed;
    left: 12px;
    bottom: 74px;
    z-index: 25;
    padding: 6px 10px;
    border-radius: 11px;
    font-size: 10.5px;
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
  }

  body.drawer-open .map-controls,
  body.drawer-open .coord-chip,
  body.drawer-open .attribution {
    right: 12px;
  }

  .map-status {
    top: 68px;
    font-size: 10px;
  }

  .site-notice {
    top: 62px;
    max-width: 92vw;
    padding: 6px 11px;
    font-size: 10px;
  }

  .drawer {
    width: 100%;
    border-left: 0;
  }

  .drawer-body h2 {
    font-size: 22px;
  }

  .map-popup {
    width: min(300px, calc(100vw - 28px));
  }

  .attribution {
    font-size: 8.5px;
    bottom: 6px;
  }

  .modal {
    padding: 20px 18px 18px;
    border-radius: 20px;
    max-height: 92vh;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .help-list li {
    grid-template-columns: 86px 1fr;
  }

  .side-tabs {
    margin-bottom: 8px;
  }

  .topic-marker.show-label .tm-label {
    opacity: 0;
  }

  .topic-marker.is-active .tm-label,
  .topic-marker:hover .tm-label {
    opacity: 1;
  }

  .lightbox {
    padding: 14px;
  }

  .lb-nav {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .lb-nav.prev {
    left: 8px;
  }

  .lb-nav.next {
    right: 8px;
  }

  .image-thumb {
    width: 66px;
    height: 66px;
  }

  .toast-wrap {
    bottom: 78px;
  }
}

@media (max-width: 380px) {
  #btnHeat {
    display: none;
  }

  #btnAdd {
    padding: 0 10px;
  }

  .brand {
    padding: 6px 8px;
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .brand-text h1 {
    font-size: 13px;
  }
}

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

/* ---------------- 房价板块 ---------------- */
.housing-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  scrollbar-width: thin;
}

.housing-head {
  padding: 4px 4px 7px;
  font-size: 10px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.housing-item {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.housing-item:hover {
  background: rgba(255, 255, 255, 0.82);
}

.housing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.housing-city {
  font-size: 13px;
  font-weight: 700;
}

.housing-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.housing-price small {
  margin-left: 2px;
  font-size: 9px;
  font-weight: 400;
  color: var(--ink-faint);
}

.housing-meta {
  margin-top: 3px;
  font-size: 9px;
  color: var(--ink-faint);
}

.housing-districts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.housing-districts span {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-soft);
}

body.tab-housing .marker-layer {
  opacity: 0;
  pointer-events: none;
}

/* ---------------- 房价云图 ---------------- */
.housing-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.price-blob {
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  filter: blur(7px);
  opacity: 0.62;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-blob span {
  position: relative;
  z-index: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #3b2f26;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  filter: none;
}

.housing-legend {
  position: absolute;
  right: 20px;
  bottom: 42px;
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-size: 9px;
  color: var(--ink-soft);
}

.housing-legend i {
  display: block;
  width: 96px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #22c55e, #facc15, #f97316, #dc2626);
}

.housing-legend em {
  font-style: normal;
  color: var(--ink-faint);
}

.housing-trend {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.housing-trend svg {
  width: 100%;
  height: auto;
  display: block;
}

.housing-trend p {
  margin: 5px 0 0;
  font-size: 9px;
  color: var(--ink-faint);
}

.housing-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

body.map-moving .housing-canvas,
body.map-zooming .housing-canvas {
  opacity: 0;
}
