:root {
  --ink: #17324d;
  --paper: #f4f0e6;
  --brass: #d38b3c;
  --night: #0d2034;
  --panel-surface: rgba(255, 255, 252, .9);
  --panel-border: rgba(111, 127, 113, .22);
  --panel-muted: #718174;
  --panel-hover: #edf3e9;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
#map { position: fixed; inset: 0; z-index: 0; }

.place-panel {
  position: fixed; z-index: 10; top: 18px; bottom: 18px; left: 18px; width: 286px;
  overflow: hidden; border: 1px solid var(--panel-border); border-radius: 16px;
  background: var(--panel-surface); box-shadow: 0 10px 28px rgba(67, 82, 68, .13);
  color: var(--ink); backdrop-filter: blur(12px); transition: width .22s ease, height .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.place-panel.is-collapsed { width: 52px; height: 52px; bottom: auto; overflow: visible; border-color: transparent; background: transparent; box-shadow: none; }
.panel-content { width: 286px; height: 100%; overflow-y: auto; padding: 23px 20px 24px; transition: opacity .16s ease; }
.place-panel.is-collapsed .panel-content { opacity: 0; pointer-events: none; }
.panel-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; color: #66806c; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.panel-kicker::after { color: var(--panel-muted); content: "浏览地点 · 点击定位"; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.panel-title { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 26px; font-weight: 500; letter-spacing: .02em; }
.place-count { margin: 20px 0 6px; color: var(--panel-muted); font-size: 12px; }
.index-section { margin-top: 22px; }
.index-section + .index-section { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(111, 127, 113, .2); }
.index-section-title { margin: 0 0 -2px; color: var(--panel-muted); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.category-group { margin-top: 15px; }
.category-heading { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; color: #526558; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.category-heading::before { width: 8px; height: 8px; border-radius: 50%; background: var(--category-color); content: ""; }
.place-list { margin: 0; padding: 0; list-style: none; }
.place-button { display: flex; width: 100%; gap: 11px; align-items: center; padding: 10px 9px; border: 0; border-top: 1px solid rgba(111, 127, 113, .13); border-radius: 7px; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.place-button:hover, .place-button:focus-visible { background: var(--panel-hover); outline: 2px solid rgba(102, 128, 108, .28); outline-offset: -2px; }
.place-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--category-color, var(--brass)); }
.place-name { font-size: 14px; }
.place-button--area .place-dot { border: 2px solid var(--category-color, var(--brass)); border-radius: 2px; background: transparent; }
.place-kind { margin-left: auto; padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--category-color, var(--brass)) 35%, transparent); border-radius: 999px; color: var(--category-color, var(--brass)); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.panel-toggle { position: absolute; z-index: 1; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: #506457; cursor: pointer; font-size: 0; }
.panel-toggle::before { display: block; content: "‹"; font-size: 25px; line-height: 1; transform: translateY(-1px); }
.place-panel.is-collapsed .panel-toggle { top: 0; right: 0; width: 52px; height: 52px; border-color: var(--panel-border); background: rgba(255, 255, 252, .94); box-shadow: 0 6px 18px rgba(67, 82, 68, .16); }
.place-panel.is-collapsed .panel-toggle::before { content: ""; width: 17px; height: 2px; border-radius: 2px; background: #506457; box-shadow: 0 -6px #506457, 0 6px #506457; transform: none; }
.panel-toggle:hover, .panel-toggle:focus-visible { background: #edf3e9; outline: 2px solid rgba(102, 128, 108, .36); outline-offset: 2px; }

.map-pin { width: 18px; height: 18px; border: 3px solid var(--paper); border-radius: 50%; background: var(--category-color, var(--brass)); box-shadow: 0 0 0 5px rgba(13, 32, 52, .18), 0 3px 8px rgba(13, 32, 52, .35); cursor: pointer; transition: transform .16s ease; }
.map-pin:hover { transform: scale(1.22); }

.maplibregl-popup { max-width: 286px !important; }
.maplibregl-popup-content { padding: 0; overflow: hidden; border: 1px solid rgba(23, 50, 77, .15); border-radius: 8px; box-shadow: 0 14px 38px rgba(4, 20, 32, .28); }
.maplibregl-popup-tip { border-bottom-color: var(--paper) !important; }
.place-card { position: relative; overflow: hidden; border-top: 4px solid var(--category-color, var(--brass)); background: var(--paper); }
.place-card img { display: block; width: 100%; height: 142px; object-fit: cover; }
.card-copy { padding: 14px 16px 16px; }
.card-close { position: absolute; z-index: 1; top: 8px; right: 8px; width: 27px; height: 27px; border: 0; border-radius: 50%; background: rgba(13, 32, 52, .78); color: #fff; cursor: pointer; font-size: 20px; line-height: 1; }
.card-close:hover, .card-close:focus-visible { background: var(--night); outline: 2px solid var(--category-color, var(--brass)); outline-offset: 2px; }
.card-eyebrow { margin: 0 0 5px; color: var(--category-color, #8c5a28); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.card-title { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 20px; font-weight: 500; }
.card-description { margin: 8px 0 0; color: #466075; font-size: 13px; line-height: 1.6; }

@media (max-width: 640px) {
  .place-panel { top: 10px; bottom: auto; left: 10px; width: 260px; max-height: calc(100vh - 20px); }
  .panel-content { width: 260px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
