:root {
  --ink: #17324d;
  --paper: #f4f0e6;
  --brass: #d38b3c;
  --night: #0d2034;
}

* { 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: 264px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 8px;
  background: rgba(13, 32, 52, .94);
  box-shadow: 0 12px 36px rgba(4, 20, 32, .28);
  color: #fff;
  transition: width .25s ease;
}

.place-panel.is-collapsed { width: 42px; }

.panel-content {
  width: 264px;
  padding: 22px 18px;
  transition: opacity .16s ease;
}

.place-panel.is-collapsed .panel-content {
  opacity: 0;
  pointer-events: none;
}

.panel-kicker {
  margin: 0 0 5px;
  color: #9ab4c6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}

.panel-title {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 25px;
  font-weight: 500;
}

.place-count {
  margin: 25px 0 10px;
  color: #b9ceda;
  font-size: 12px;
}

.place-list { margin: 0; padding: 0; list-style: none; }

.place-button {
  display: flex;
  width: 100%;
  gap: 11px;
  align-items: center;
  padding: 11px 8px;
  border: 0;
  border-top: 1px solid rgba(184, 210, 224, .18);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.place-button:hover,
.place-button:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }

.place-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(211, 139, 60, .18);
}

.place-name { font-size: 14px; }

.panel-toggle {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
}

.place-panel.is-collapsed .panel-toggle { height: 100%; background: var(--night); }

.panel-toggle:hover,
.panel-toggle:focus-visible { background: rgba(255, 255, 255, .12); outline: 2px solid var(--brass); outline-offset: -4px; }

.map-pin {
  width: 18px;
  height: 18px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 5px rgba(211, 139, 60, .24), 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; 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(--brass); outline-offset: 2px; }

.card-eyebrow {
  margin: 0 0 5px;
  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: 236px; }
  .panel-content { width: 236px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
