:root {
  --ink: #26211c;
  --muted: #756957;
  --paper: #f5e8ce;
  --panel: #fff6e5;
  --line: #ceb58e;
  --brick: #b8442f;
  --river: #1d7f98;
  --leaf: #2f7356;
  --gold: #c48322;
  --rose: #d65e58;
  --charcoal: #24282a;
  --shadow: 0 22px 55px rgba(41, 31, 20, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--paper);
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

.experience {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  min-height: 100vh;
}

.experience.is-panel-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.guide-panel {
  position: relative;
  z-index: 20;
  height: 100vh;
  overflow: auto;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 246, 229, 0.98), rgba(240, 219, 184, 0.96)),
    var(--panel);
  border-right: 2px solid var(--charcoal);
  box-shadow: 14px 0 42px rgba(41, 31, 20, 0.14);
}

.panel-toggle {
  position: sticky;
  top: 0;
  z-index: 10;
  display: inline-flex;
  min-height: 36px;
  margin-bottom: 16px;
  padding: 0 13px;
  align-items: center;
  color: #fff9eb;
  background: var(--charcoal);
  border-radius: 999px;
  cursor: pointer;
}

.guide-header {
  padding-bottom: 18px;
  border-bottom: 2px solid var(--charcoal);
}

.guide-header p,
.map-title p,
.boss-note span,
.selected-kicker {
  margin: 0 0 7px;
  color: var(--brick);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.guide-header span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.filter,
.map-link {
  min-height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    color 140ms ease;
}

.filter {
  color: var(--charcoal);
  border: 1px solid var(--line);
  background: rgba(255, 249, 235, 0.74);
}

.filter:hover,
.map-link:hover {
  transform: translateY(-1px);
}

.filter.is-active {
  color: #fff9eb;
  border-color: var(--charcoal);
  background: var(--charcoal);
}

.search-field {
  display: grid;
  gap: 7px;
  margin: 0 0 18px;
}

.search-field span {
  color: var(--brick);
  font-size: 0.78rem;
  font-weight: 900;
}

.search-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 249, 235, 0.9);
  outline: none;
}

.search-field input:focus {
  border-color: var(--brick);
  box-shadow: 0 0 0 2px rgba(184, 68, 47, 0.14);
}

.boss-note {
  margin-bottom: 18px;
  padding: 15px;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  background: #f7d56f;
  box-shadow: 6px 6px 0 var(--charcoal);
  transform: rotate(-0.8deg);
}

.boss-note strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.55;
}

.places {
  display: grid;
  gap: 11px;
  padding-bottom: 20px;
}

.empty-state {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.72);
  line-height: 1.5;
}

.map-error {
  position: absolute;
  inset: 24px;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--charcoal);
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  background: rgba(255, 249, 235, 0.94);
  box-shadow: 8px 8px 0 var(--charcoal);
  font-weight: 900;
  line-height: 1.6;
  text-align: center;
}

.uses-google-map #map {
  filter: saturate(0.82) contrast(0.96) sepia(0.08);
}

.place {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.82);
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.place:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(41, 31, 20, 0.12);
}

.place.is-active {
  border-color: var(--brick);
  box-shadow: 0 0 0 2px rgba(184, 68, 47, 0.16);
}

.place-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  color: #fff9eb;
  border-radius: 999px;
  background: var(--leaf);
  font-weight: 900;
}

.place-mark.has-image {
  border: 2px solid var(--charcoal);
  background: #fff9eb;
}

.place-mark img,
.map-pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place[data-category="home"] .place-mark {
  background: var(--brick);
}

.place[data-category="gift"] .place-mark {
  background: var(--gold);
}

.place[data-category="craft"] .place-mark {
  background: var(--rose);
}

.place[data-category="view"] .place-mark {
  background: var(--river);
}

.place[data-category="cafe"] .place-mark {
  background: var(--leaf);
}

.place[data-category="bar"] .place-mark {
  background: var(--charcoal);
}

.place[data-category="food"] .place-mark {
  background: var(--gold);
}

.place h3,
.selected-place h2,
.map-title h2 {
  margin: 0;
  line-height: 1.12;
}

.place h3 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.place p,
.selected-place p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--charcoal);
  background: #eadcc4;
  font-size: 0.75rem;
  font-weight: 800;
}

.guide-panel.is-collapsed {
  width: 82px;
  padding: 18px 13px;
  overflow: hidden;
}

.guide-panel.is-collapsed .guide-content {
  display: none;
}

.guide-panel.is-collapsed .panel-toggle {
  writing-mode: vertical-rl;
  min-width: 42px;
  min-height: 86px;
  margin: 0 auto;
  padding: 12px 0;
}

.map-area {
  position: relative;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  background: #dfcaa4;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  filter: saturate(0.76) contrast(0.94) sepia(0.18);
}

#map .leaflet-pane,
#map .leaflet-tile,
#map .leaflet-marker-icon,
#map .leaflet-marker-shadow,
#map .leaflet-tile-container,
#map .leaflet-pane > svg,
#map .leaflet-pane > canvas,
#map .leaflet-zoom-box,
#map .leaflet-image-layer,
#map .leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

#map .leaflet-container {
  overflow: hidden;
}

#map .leaflet-tile,
#map .leaflet-marker-icon,
#map .leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

#map .leaflet-tile {
  width: 256px;
  height: 256px;
}

#map .leaflet-pane,
#map .leaflet-map-pane {
  z-index: auto;
}

#map .leaflet-tile-pane {
  z-index: 200;
}

#map .leaflet-overlay-pane {
  z-index: 400;
}

#map .leaflet-marker-pane {
  z-index: 600;
}

#map .leaflet-tooltip-pane {
  z-index: 650;
}

#map .leaflet-popup-pane {
  z-index: 700;
}

#map .leaflet-control {
  position: relative;
  z-index: 800;
}

#map .leaflet-control-container .leaflet-top,
#map .leaflet-control-container .leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

#map .leaflet-control-container .leaflet-top {
  top: 0;
}

#map .leaflet-control-container .leaflet-right {
  right: 0;
}

#map .leaflet-control-container .leaflet-bottom {
  bottom: 0;
}

#map .leaflet-control-container .leaflet-left {
  left: 0;
}

#map .leaflet-control {
  float: left;
  clear: both;
  pointer-events: auto;
}

.map-area::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(245, 232, 206, 0.36), transparent 38%),
    linear-gradient(180deg, transparent 58%, rgba(38, 33, 28, 0.28));
  content: "";
}

.map-title {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 5;
  max-width: min(370px, calc(100% - 48px));
  padding: 14px 18px;
  color: #fff9eb;
  background: var(--brick);
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  box-shadow: 7px 7px 0 var(--charcoal);
  transform: rotate(1.1deg);
}

.map-title p {
  color: #f7d56f;
}

.map-title h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.selected-place {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  width: min(520px, calc(100% - 48px));
  padding: 18px;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  background: rgba(255, 249, 235, 0.92);
  box-shadow: 8px 8px 0 var(--charcoal);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.selected-place.is-hidden,
.experience:not(.is-panel-collapsed) .selected-place {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

.selected-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
  display: flex;
  width: 32px;
  height: 32px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  border: 2px solid var(--charcoal);
  border-radius: 999px;
  background: rgba(255, 249, 235, 0.96);
  box-shadow: 2px 2px 0 var(--charcoal);
  cursor: pointer;
}

.selected-close::before {
  content: "×";
  display: block;
  color: currentColor;
  font-size: 1.22rem;
  line-height: 1;
  transform: translateY(-1px);
}

.selected-close:hover {
  color: var(--cream);
  background: var(--charcoal);
}

.selected-place h2 {
  margin-bottom: 8px;
  padding-right: 34px;
  font-size: 1.5rem;
}

.selected-image {
  float: left;
  width: 58px;
  height: 58px;
  margin: 0 12px 8px 0;
  object-fit: cover;
  border: 2px solid var(--charcoal);
  border-radius: 999px;
  background: #fff9eb;
  box-shadow: 3px 3px 0 var(--charcoal);
}

.follow-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(36, 40, 42, 0.18);
}

.follow-box span {
  width: 100%;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.follow-box a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  color: var(--brick);
  text-decoration: none;
  border: 1px solid rgba(184, 68, 47, 0.28);
  border-radius: 999px;
  background: rgba(255, 249, 235, 0.82);
  font-size: 0.86rem;
  font-weight: 900;
}

.map-link,
.reel-link,
.ig-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  margin-right: 8px;
  padding: 0 16px;
  color: #fff9eb;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--charcoal);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.reel-link {
  background: var(--rose);
}

.reel-link.compact {
  min-height: auto;
  margin: 0 0 7px;
  padding: 0;
  color: var(--rose);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 900;
}

.ig-link {
  background: var(--brick);
}

.ig-link.compact {
  min-height: auto;
  margin: 0 0 7px;
  padding: 0;
  color: var(--brick);
  background: transparent;
  font-size: 0.84rem;
  border: 0;
}

.map-link.compact {
  min-height: 32px;
  margin-top: 6px;
}

.map-pin {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  color: #fff9eb;
  background: var(--leaf);
  border: 3px solid var(--charcoal);
  border-radius: 999px 999px 999px 10px;
  box-shadow: 4px 4px 0 rgba(36, 40, 42, 0.92);
  font-size: 0.92rem;
  font-weight: 950;
  transform: rotate(-7deg);
}

.map-pin.has-image {
  background: #fff9eb;
}

.google-image-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff9eb;
  border: 3px solid var(--charcoal);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(36, 40, 42, 0.92);
}

.google-image-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-pin span {
  transform: rotate(7deg);
}

.map-pin.home {
  background: var(--brick);
}

.map-pin.gift {
  background: var(--gold);
}

.map-pin.craft {
  background: var(--rose);
}

.map-pin.view {
  background: var(--river);
}

.map-pin.cafe {
  background: var(--leaf);
}

.map-pin.bar {
  background: var(--charcoal);
}

.map-pin.food {
  background: var(--gold);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 8px;
  background: #fff9eb;
}

#map .gm-style-iw-c {
  max-width: min(320px, calc(100vw - 92px)) !important;
  padding: 14px 18px 14px !important;
  border-radius: 8px !important;
}

#map .gm-style-iw-chr {
  position: absolute !important;
  top: 10px !important;
  right: 18px !important;
  z-index: 2 !important;
  display: flex !important;
  width: 24px !important;
  height: 24px !important;
  align-items: center !important;
  justify-content: center !important;
}

#map .gm-style-iw-ch {
  display: none !important;
}

#map .gm-ui-hover-effect {
  display: flex !important;
  position: relative !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  opacity: 1 !important;
}

#map .gm-ui-hover-effect span {
  display: none !important;
}

#map .gm-ui-hover-effect::before {
  content: "×";
  display: block;
  width: 24px;
  height: 24px;
  color: #6f6a61;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
}

#map .gm-style-iw-d {
  overflow: visible !important;
}

.popup-card {
  max-width: 280px;
}

#map .gm-style-iw button:focus,
#map .gm-style-iw button:focus-visible,
#map .gm-style-iw a:focus,
#map .gm-style-iw a:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.popup-title {
  margin: 0 34px 6px 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.22;
}

.popup-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

#map .map-link.compact {
  min-height: 32px;
  margin-top: 10px;
  padding: 0 13px;
  font-size: 0.88rem;
}

@media (max-width: 920px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .experience {
    grid-template-columns: minmax(0, 1fr);
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .experience.is-panel-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-panel {
    position: fixed;
    top: 14px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .guide-panel.is-collapsed {
    width: auto;
    padding: 0;
    overflow: visible;
  }

  .guide-panel .guide-content {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(340px, 100vw);
    max-height: 100dvh;
    padding: 58px 18px 18px;
    overflow: auto;
    background: var(--panel);
    border-right: 2px solid var(--charcoal);
    box-shadow: 18px 0 35px rgba(41, 31, 20, 0.16);
  }

  .guide-panel.is-collapsed .guide-content {
    display: none;
  }

  .guide-panel .panel-toggle {
    position: relative;
    z-index: 30;
    writing-mode: horizontal-tb;
    min-width: auto;
    min-height: 32px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid rgba(255, 249, 235, 0.22);
    box-shadow: 3px 3px 0 rgba(36, 40, 42, 0.2);
    font-size: 0.78rem;
    line-height: 1;
  }

  .guide-panel.is-collapsed .panel-toggle {
    writing-mode: vertical-rl;
    min-width: 36px;
    min-height: 64px;
    margin: 0;
    padding: 9px 0;
    line-height: 1.05;
  }

  .map-area {
    height: 100dvh;
    max-height: 100dvh;
  }

  .map-title {
    top: 14px;
    right: 10px;
    max-width: calc(100% - 74px);
    padding: 8px 10px;
    box-shadow: 4px 4px 0 var(--charcoal);
  }

  .map-title p {
    margin-bottom: 3px;
    font-size: 0.56rem;
  }

  .map-title h2 {
    font-size: 1.24rem;
  }

  .selected-place {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    max-height: min(36dvh, 270px);
    padding: 12px 42px 12px 12px;
    overflow: auto;
    box-shadow: 4px 4px 0 var(--charcoal);
  }

  .selected-close {
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
  }

  .selected-close::before {
    font-size: 1.08rem;
  }

  .selected-image {
    width: 44px;
    height: 44px;
    margin: 0 9px 6px 0;
    box-shadow: 2px 2px 0 var(--charcoal);
  }

  .selected-kicker {
    margin-bottom: 5px;
    font-size: 0.68rem;
  }

  .selected-place h2 {
    margin-bottom: 5px;
    padding-right: 32px;
    font-size: 1.08rem;
  }

  .selected-place p {
    display: -webkit-box;
    font-size: 0.8rem;
    line-height: 1.34;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .selected-place .meta {
    gap: 4px;
    margin-top: 6px;
  }

  .selected-place .tag {
    padding: 3px 7px;
    font-size: 0.68rem;
  }

  .selected-place .ig-link,
  .selected-place .reel-link,
  .selected-place .map-link {
    min-height: 34px;
    margin-top: 7px;
    margin-right: 5px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .follow-box {
    gap: 6px;
    margin-top: 8px;
    padding-top: 7px;
  }

  .follow-box span {
    display: none;
  }

  .follow-box a {
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  #map .gm-style-iw-c {
    max-width: min(250px, calc(100vw - 132px)) !important;
    padding: 12px 16px 12px !important;
  }

  #map .gm-style-iw-chr {
    top: 10px !important;
    right: 18px !important;
  }

  .popup-card {
    max-width: 220px;
  }

  .popup-title {
    margin: 0 30px 6px 0;
    font-size: 1rem;
  }

  .popup-copy {
    display: -webkit-box;
    font-size: 0.78rem;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  #map .map-link.compact {
    min-height: 30px;
    margin-top: 9px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

}
