/* =========================================
   PHOTO MAP
   Dedicated PHOTO GUIDE layout
========================================= */

.photo-map-page .guide-article-navigation {
  display: none;
}

.photo-map-page [data-guide-article] {
  background: #fff;
}

.field-guide-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(15, 45, 70, .12);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.field-guide-nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 72px;
}

.field-guide-brand {
  color: var(--navy);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.05;
}

.field-guide-brand small {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: .08em;
}

.field-guide-links {
  display: flex;
  justify-content: flex-end;
  gap: 25px;
}

.field-guide-links a {
  position: relative;
  padding: 27px 0 23px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.field-guide-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  background: var(--blue);
}

.field-guide-spot-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.field-guide-spot-button span {
  color: var(--blue);
  font-size: 8px;
}

/* HERO */

.photo-map-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background:
    var(--photo-map-hero),
    linear-gradient(
      135deg,
      #dcecf3 0%,
      #eff5f7 48%,
      #dac9a6 100%
    );
  background-position: center;
  background-size: cover;
}

.photo-map-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.94) 0%,
      rgba(255,255,255,.72) 42%,
      rgba(255,255,255,.15) 72%,
      rgba(255,255,255,.05) 100%
    );
}

.photo-map-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  padding-top: 44px;
  padding-bottom: 44px;
}

.photo-map-hero-eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.photo-map-hero h1 {
  margin: 0 0 16px;
  color: var(--navy);
  font-family:
    "Noto Serif CJK JP",
    "Yu Mincho",
    serif;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .02em;
}

.photo-map-hero-lead {
  max-width: 600px;
  margin: 0;
  color: #2c465a;
  font-size: 14px;
  line-height: 1.95;
}

.photo-map-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.photo-map-hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 700;
}

.photo-map-hero-button-primary {
  color: #fff;
  background: var(--navy);
}

/* EXPLORER */

.photo-map-explorer {
  padding: 0 0 54px;
  background: #fff;
}

.photo-map-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.photo-map-view-tabs button {
  position: relative;
  min-height: 56px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.photo-map-view-tabs button.is-active {
  color: var(--navy);
}

.photo-map-view-tabs button.is-active::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: -1px;
  left: 10%;
  height: 3px;
  background: var(--blue);
}

.photo-map-search-mode {
  display: flex;
  gap: 8px;
  padding: 4px 0 10px;
}

.photo-map-search-mode button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.photo-map-search-mode button.is-active {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.photo-map-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
  scrollbar-width: thin;
}

.photo-map-filters button {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.photo-map-filters button.is-active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.photo-map-map-view {
  display: grid;
  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(370px, .95fr);
  gap: 12px;
  align-items: stretch;
}

.photo-map-canvas {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #dcecf0;
}

.photo-map-base-image,
.photo-map-base-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.photo-map-base-image {
  object-fit: cover;
}

.photo-map-base-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 35% 34%,
      rgba(108, 161, 108, .42) 0 9%,
      transparent 10%
    ),
    radial-gradient(
      circle at 52% 48%,
      rgba(96, 158, 115, .38) 0 17%,
      transparent 18%
    ),
    radial-gradient(
      circle at 67% 67%,
      rgba(112, 165, 119, .36) 0 14%,
      transparent 15%
    ),
    linear-gradient(
      145deg,
      #d5edf1 0 35%,
      #d9e8d6 36% 66%,
      #bfe0e9 67% 100%
    );
  color: rgba(18, 58, 80, .55);
  text-align: center;
}

.photo-map-base-placeholder::before,
.photo-map-base-placeholder::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(21,58,91,.12);
}

.photo-map-base-placeholder::before {
  width: 72%;
  aspect-ratio: 1;
}

.photo-map-base-placeholder::after {
  width: 46%;
  aspect-ratio: 1;
}

.photo-map-base-placeholder strong {
  position: relative;
  z-index: 1;
  display: block;
  font-family:
    "Noto Serif CJK JP",
    "Yu Mincho",
    serif;
  font-size: 28px;
  letter-spacing: .12em;
}

.photo-map-base-placeholder small {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 360px);
  font-size: 10px;
}

.photo-map-placeholder-north {
  position: absolute;
  top: 24px;
  left: 24px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(21,58,91,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  font-family: serif;
  font-weight: 700;
}

.photo-map-pins {
  position: absolute;
  inset: 0;
}

.photo-map-pin {
  position: absolute;
  top: var(--map-y);
  left: var(--map-x);
  z-index: 2;
  display: flex;
  gap: 7px;
  align-items: center;
  max-width: 190px;
  padding: 7px 10px 7px 8px;
  transform: translate(-14px, -50%);
  border: 1px solid rgba(15,45,70,.16);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255,255,255,.96);
  box-shadow: 0 5px 18px rgba(18,58,80,.16);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.photo-map-pin:hover,
.photo-map-pin.is-selected {
  z-index: 5;
  transform:
    translate(-14px, -50%)
    scale(1.05);
  box-shadow: 0 8px 24px rgba(18,58,80,.24);
}

.photo-map-pin[hidden] {
  display: none;
}

.photo-map-pin-dot {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--marker-color, var(--blue));
}

.photo-map-pin-dot::after {
  content: "";
  position: absolute;
}

.photo-map-marker-coast {
  --marker-color: #247bc5;
}

.photo-map-marker-wetland {
  --marker-color: #42904f;
}

.photo-map-marker-wildlife {
  --marker-color: #9a681d;
}

.photo-map-marker-observatory {
  --marker-color: #7446a2;
}

.photo-map-side-list {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.photo-spot-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 132px;
  border-bottom: 1px solid var(--line);
  transition: background .18s ease;
}

.photo-spot-card:last-of-type {
  border-bottom: 0;
}

.photo-spot-card:hover,
.photo-spot-card.is-selected {
  background: #f4f8fa;
}

.photo-spot-card[hidden],
.photo-spot-list-card[hidden] {
  display: none;
}

.photo-spot-card-visual,
.photo-spot-list-visual,
.photo-map-course-image {
  overflow: hidden;
  background: #e8f0f3;
}

.photo-spot-card-visual img,
.photo-spot-list-visual img,
.photo-map-course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-map-image-placeholder {
  display: grid;
  place-content: center;
  width: 100%;
  height: 100%;
  min-height: 110px;
  padding: 12px;
  background:
    linear-gradient(
      145deg,
      #e8f2f5,
      #cfdee4
    );
  color: var(--muted);
  text-align: center;
}

.photo-map-image-placeholder span {
  font-size: 8px;
  letter-spacing: .15em;
}

.photo-map-image-placeholder strong {
  margin-top: 5px;
  color: var(--navy);
  font-size: 11px;
}

.photo-spot-card-copy {
  padding: 14px 16px;
}

.photo-spot-card-titleline {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
}

.photo-spot-card h3,
.photo-spot-list-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.5;
}

.photo-spot-type {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--marker-color);
  font-size: 8px;
  font-weight: 700;
}

.photo-spot-card-copy > p,
.photo-spot-list-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.photo-spot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}

.photo-spot-meta-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.photo-spot-meta-item small {
  color: #82909b;
  font-size: 7px;
}

.photo-spot-meta-item strong {
  color: var(--navy);
  font-size: 9px;
}

.photo-spot-detail {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.photo-map-empty {
  margin: 0;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

/* LIST VIEW */

.photo-map-list-view {
  padding-top: 4px;
}

.photo-map-list-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.photo-spot-list-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.photo-spot-list-visual {
  min-height: 190px;
}

.photo-spot-list-copy {
  padding: 20px;
}

.photo-spot-list-area {
  margin-bottom: 4px !important;
  color: var(--blue) !important;
  font-size: 8px !important;
  font-weight: 700;
  letter-spacing: .08em;
}

.photo-spot-list-copy > a {
  display: inline-block;
  margin-top: 12px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

/* LEGEND */

.photo-map-legend {
  margin-top: 14px;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(22,55,82,.04);
}

.photo-map-legend h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 14px;
}

.photo-map-legend-grid {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.photo-map-legend-grid > div {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 8px;
  align-items: center;
}

.photo-map-legend-grid strong {
  color: var(--navy);
  font-size: 10px;
}

.photo-map-legend-grid small {
  grid-column: 2;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.photo-map-legend-pin {
  grid-row: 1 / span 2;
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--marker-color);
}

.photo-map-weather-icon {
  grid-row: 1 / span 2;
  color: #e9a630;
  font-size: 20px;
}

/* COURSE */

.photo-map-courses {
  padding: 46px 0 54px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.photo-map-section-heading {
  margin-bottom: 20px;
}

.photo-map-section-heading p {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.photo-map-section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.photo-map-course-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.photo-map-course {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.photo-map-course-image {
  aspect-ratio: 16 / 9;
}

.photo-map-course-copy {
  padding: 18px;
}

.photo-map-course-eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

.photo-map-course h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 17px;
}

.photo-map-course-copy > p:not(.photo-map-course-eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.photo-map-course-copy span {
  display: inline-block;
  margin-top: 12px;
  color: var(--navy);
  font-size: 9px;
  font-weight: 700;
}

/* MANNER CTA */

.photo-map-manner-cta {
  padding: 0 0 60px;
  background: #fbfcfd;
}

.photo-map-manner-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 26px 30px;
  border: 1px solid #d7dfc9;
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      #f4f4e9,
      #f8faf3
    );
}

.photo-map-manner-inner p {
  margin: 0 0 5px;
  color: #557357;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.photo-map-manner-inner h2 {
  margin: 0 0 6px;
  color: #315a45;
  font-family:
    "Noto Serif CJK JP",
    "Yu Mincho",
    serif;
  font-size: 22px;
  font-weight: 500;
}

.photo-map-manner-inner span {
  color: var(--muted);
  font-size: 10px;
}

.photo-map-manner-inner > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 44px;
  border: 1px solid #54745e;
  border-radius: 8px;
  color: #315a45;
  background: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 700;
}

/* TABLET */

@media (max-width: 980px) {
  .field-guide-nav-inner {
    grid-template-columns: auto 1fr;
  }

  .field-guide-spot-button {
    display: none;
  }

  .photo-map-map-view {
    grid-template-columns: 1fr;
  }

  .photo-map-canvas {
    min-height: 520px;
  }

  .photo-map-side-list {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 1px;
    max-height: none;
    background: var(--line);
  }

  .photo-spot-card {
    grid-template-columns: 120px minmax(0, 1fr);
    background: #fff;
  }

  .photo-map-legend-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

/* MOBILE */

@media (max-width: 680px) {
  .field-guide-nav {
    position: static;
  }

  .field-guide-nav-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .field-guide-links {
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
  }

  .field-guide-links a {
    flex: 0 0 auto;
    padding: 10px 0 14px;
    font-size: 10px;
  }

  .field-guide-links a[aria-current="page"]::after {
    bottom: 8px;
  }

  .photo-map-hero,
  .photo-map-hero-inner {
    min-height: 390px;
  }

  .photo-map-hero-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,.94),
        rgba(255,255,255,.75)
      );
  }

  .photo-map-hero h1 {
    font-size: 48px;
  }

  .photo-map-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100%, 330px);
  }

  .photo-map-view-tabs button {
    min-height: 48px;
  }

  .photo-map-search-mode {
    overflow-x: auto;
  }

  .photo-map-search-mode button {
    flex: 0 0 auto;
  }

  .photo-map-canvas {
    min-height: 470px;
  }

  .photo-map-pin {
    max-width: 145px;
    padding: 6px 8px 6px 7px;
    font-size: 8px;
  }

  .photo-map-pin-dot {
    flex-basis: 14px;
    width: 14px;
    height: 14px;
  }

  .photo-map-side-list {
    grid-template-columns: 1fr;
  }

  .photo-spot-card {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .photo-map-list-grid {
    grid-template-columns: 1fr;
  }

  .photo-spot-list-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .photo-spot-list-visual {
    min-height: 160px;
  }

  .photo-map-legend-grid {
    grid-template-columns: 1fr;
  }

  .photo-map-course-grid {
    grid-template-columns: 1fr;
  }

  .photo-map-manner-inner {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .photo-map-manner-inner > a {
    width: 100%;
  }
}


/* =========================================
   PHOTO MAP v2
   MAP / LIST differentiation
   hover pin captions
   expandable model courses
========================================= */

.photo-map-map-panel {
  display: grid;
  gap: 14px;
}

.photo-map-map-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  padding: 4px 0 2px;
}

.photo-map-control-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.photo-map-map-toolbar .photo-map-filters {
  align-self: end;
  padding-bottom: 0;
}

.photo-map-map-view {
  grid-template-columns:
    minmax(0, 1.22fr)
    minmax(310px, .58fr);
}

.photo-map-selected {
  min-height: 600px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.photo-map-selected-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.photo-map-selected-visual {
  min-height: 255px;
  max-height: 315px;
  overflow: hidden;
  background: #e8f0f3;
}

.photo-map-selected-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-map-selected-copy {
  padding: 24px;
}

.photo-map-selected-area {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.photo-map-selected-title {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.photo-map-selected-title h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.photo-map-selected-description {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.photo-map-selected-empty {
  display: grid;
  place-content: center;
  min-height: 100%;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.photo-map-selected-empty strong {
  color: var(--navy);
  font-size: 15px;
}

.photo-map-selected-empty p {
  max-width: 280px;
  margin: 10px auto 0;
  font-size: 11px;
  line-height: 1.8;
}

/* Pin itself is always the only visible element.
   Caption appears on mouse hover / keyboard focus. */

.photo-map-pin {
  width: 30px;
  height: 30px;
  max-width: none;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.photo-map-pin:hover,
.photo-map-pin.is-selected {
  transform: translate(-50%, -50%);
  box-shadow: none;
}

.photo-map-pin-dot {
  position: absolute;
  inset: 3px;
  width: auto;
  height: auto;
  border:
    3px solid rgba(255, 255, 255, .96);
  border-radius: 50% 50% 50% 0;
  box-shadow:
    0 4px 12px rgba(18, 58, 80, .28);
}

.photo-map-pin.is-selected .photo-map-pin-dot {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, .88),
    0 0 0 7px var(--marker-color),
    0 5px 16px rgba(18, 58, 80, .3);
}

.photo-map-pin-caption {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  z-index: 8;
  width: max-content;
  max-width: 180px;
  padding: 7px 10px;
  transform:
    translateY(-50%)
    translateX(-4px);
  border:
    1px solid rgba(15, 45, 70, .12);
  border-radius: 8px;
  color: var(--navy);
  background:
    rgba(255, 255, 255, .98);
  box-shadow:
    0 6px 18px
    rgba(18, 58, 80, .16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  transition:
    opacity .15s ease,
    transform .15s ease,
    visibility .15s ease;
}

.photo-map-pin:hover
.photo-map-pin-caption,
.photo-map-pin:focus-visible
.photo-map-pin-caption {
  opacity: 1;
  visibility: visible;
  transform:
    translateY(-50%)
    translateX(0);
}

.photo-map-pin:focus-visible {
  outline:
    3px solid rgba(27, 101, 160, .25);
  outline-offset: 4px;
}

/* Subject badges */

.photo-spot-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.photo-spot-subject {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #365d52;
  background: #eef5f1;
  font-size: 9px;
  font-weight: 700;
}

.photo-spot-subject i {
  font-style: normal;
}

/* LIST view has its own behavior */

.photo-map-list-view {
  padding-top: 8px;
}

.photo-map-list-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.photo-map-list-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.photo-map-list-modes {
  display: inline-flex;
  gap: 6px;
}

.photo-map-list-modes button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.photo-map-list-modes button.is-active {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.photo-map-list-results {
  display: grid;
  gap: 34px;
}

.photo-map-list-group {
  display: grid;
  gap: 14px;
}

.photo-map-list-group-heading {
  display: grid;
  grid-template-columns:
    1fr auto;
  align-items: end;
  column-gap: 16px;
}

.photo-map-list-group-heading p {
  grid-column: 1;
  margin: 0 0 3px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
}

.photo-map-list-group-heading h3 {
  grid-column: 1;
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.photo-map-list-group-heading small {
  grid-column: 1;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.photo-map-list-group-heading > span {
  grid-column: 2;
  grid-row: 1 / span 3;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* MODEL COURSE */

.photo-map-section-heading > span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.photo-map-course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.photo-map-course {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.photo-map-course-summary {
  display: grid;
  grid-template-columns:
    minmax(220px, .38fr)
    minmax(0, 1fr);
  cursor: pointer;
  list-style: none;
}

.photo-map-course-summary::-webkit-details-marker {
  display: none;
}

.photo-map-course-summary::marker {
  display: none;
  content: "";
}

.photo-map-course .photo-map-course-image {
  min-height: 210px;
  aspect-ratio: auto;
}

.photo-map-course-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
  padding: 24px 64px 24px 26px;
}

.photo-map-course-summary-text {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.photo-map-course-duration {
  margin-top: 12px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
}

.photo-map-course-open {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.photo-map-course-open b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 400;
  transition: transform .2s ease;
}

.photo-map-course[open]
.photo-map-course-open b {
  transform: rotate(45deg);
}

.photo-map-course-expanded {
  padding:
    26px
    clamp(20px, 4vw, 44px)
    34px;
  border-top: 1px solid var(--line);
  background: #f8fafb;
}

.photo-map-course-expanded-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: baseline;
  margin-bottom: 22px;
}

.photo-map-course-expanded-head p {
  width: 100%;
  margin: 0;
  color: var(--blue);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
}

.photo-map-course-expanded-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 19px;
}

.photo-map-course-expanded-head strong {
  color: var(--muted);
  font-size: 10px;
}

.photo-map-course-timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.photo-map-course-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 74px;
  width: 2px;
  background: #cfdee5;
}

.photo-map-course-stop {
  position: relative;
  display: grid;
  grid-template-columns:
    58px
    minmax(0, 1fr);
  gap: 28px;
  padding: 0 0 24px;
}

.photo-map-course-stop:last-child {
  padding-bottom: 0;
}

.photo-map-course-stop::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 68px;
  z-index: 2;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow:
    0 0 0 2px #b9d0dc;
}

.photo-map-course-time {
  padding-top: 3px;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.photo-map-course-stop-body {
  display: grid;
  grid-template-columns:
    130px
    minmax(0, 1fr);
  gap: 16px;
  min-height: 105px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.photo-map-course-stop-image {
  min-height: 105px;
  overflow: hidden;
  background: #e8f0f3;
}

.photo-map-course-stop-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-map-course-stop-copy {
  padding: 16px;
}

.photo-map-course-stop-body:not(
  :has(.photo-map-course-stop-image)
)
.photo-map-course-stop-copy {
  grid-column: 1 / -1;
}

.photo-map-course-stop-copy h4 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 14px;
}

.photo-map-course-stop-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.photo-map-course-stop-copy a {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.photo-map-course-no-stops {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 980px) {
  .photo-map-map-toolbar {
    grid-template-columns: 1fr;
  }

  .photo-map-map-view {
    grid-template-columns: 1fr;
  }

  .photo-map-selected {
    min-height: 0;
  }

  .photo-map-selected-card {
    display: grid;
    grid-template-columns:
      minmax(190px, .4fr)
      minmax(0, 1fr);
  }

  .photo-map-selected-visual {
    min-height: 220px;
    max-height: none;
  }
}

@media (max-width: 680px) {
  .photo-map-map-toolbar {
    gap: 12px;
  }

  .photo-map-pin {
    width: 27px;
    height: 27px;
  }

  .photo-map-pin-caption {
    max-width: 140px;
    font-size: 9px;
  }

  .photo-map-selected-card {
    grid-template-columns: 1fr;
  }

  .photo-map-selected-visual {
    min-height: 190px;
  }

  .photo-map-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-map-list-modes {
    display: grid;
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .photo-map-list-modes button {
    padding: 0 8px;
  }

  .photo-map-list-group-heading {
    grid-template-columns: 1fr;
  }

  .photo-map-list-group-heading > span {
    grid-column: 1;
    grid-row: auto;
    margin-top: 5px;
  }

  .photo-map-course-summary {
    grid-template-columns: 1fr;
  }

  .photo-map-course .photo-map-course-image {
    min-height: 190px;
  }

  .photo-map-course-copy {
    min-height: 0;
    padding: 22px 54px 24px 22px;
  }

  .photo-map-course-open {
    right: 18px;
    bottom: 18px;
  }

  .photo-map-course-timeline::before {
    left: 16px;
  }

  .photo-map-course-stop {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 38px;
  }

  .photo-map-course-stop::before {
    left: 10px;
  }

  .photo-map-course-time {
    text-align: left;
  }

  .photo-map-course-stop-body {
    grid-template-columns: 1fr;
  }

  .photo-map-course-stop-image {
    min-height: 160px;
  }
}

/* =========================================
   PHOTO MAP v3
   MAP / LIST tab visibility
========================================= */

/* Author CSS has display rules for both panels.
   Make the HTML hidden state authoritative. */
[data-map-panel][hidden] {
  display: none !important;
}

.photo-map-view-tabs {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
}

@media (max-width: 680px) {
  .photo-map-view-tabs {
    position: static;
  }
}

/* =========================================
   PHOTO MAP v6
   Square map canvas
========================================= */

.photo-map-canvas {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.photo-map-base-image,
.photo-map-base-placeholder {
  width: 100%;
  height: 100%;
}

.photo-map-base-image {
  object-fit: contain;
  background: #fff;
}

@media (max-width: 980px) {
  .photo-map-canvas {
    aspect-ratio: 1 / 1;
  }
}

/* =========================================
   PHOTO MAP v6.2
   Exact 100 x 100 coordinate alignment
========================================= */

/*
  x,y are 1-100 grid-cell numbers.
  JavaScript converts them to each cell center:
  1 -> 0.5%, 100 -> 99.5%.

  The bottom-center of the marker button is the
  actual coordinate. This makes the visible pin tip
  match the coordinate picker exactly.
*/
.photo-map-pin {
  width: 32px;
  height: 34px;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
}

.photo-map-pin:hover,
.photo-map-pin.is-selected {
  transform: translate(-50%, -100%);
}

.photo-map-pin-dot {
  position: absolute;
  top: 10px;
  left: 50%;
  inset: auto;
  width: 20px;
  height: 20px;
  transform: translateX(-50%) rotate(-45deg);
  transform-origin: center;
  border: 3px solid rgba(255, 255, 255, .96);
  border-radius: 50% 50% 50% 0;
  background: var(--marker-color, var(--blue));
  box-shadow: 0 4px 12px rgba(18, 58, 80, .28);
}

.photo-map-pin-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
}

.photo-map-pin.is-selected .photo-map-pin-dot {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, .88),
    0 0 0 7px var(--marker-color),
    0 5px 16px rgba(18, 58, 80, .3);
}

.photo-map-pin-caption {
  top: 8px;
  left: calc(100% + 6px);
  transform: translateY(0) translateX(-4px);
}

.photo-map-pin:hover .photo-map-pin-caption,
.photo-map-pin:focus-visible .photo-map-pin-caption {
  transform: translateY(0) translateX(0);
}

/* =========================================
   PHOTO MAP v6.3
   Exact SVG pin anchor + readability
========================================= */

/*
  --map-x / --map-y is the coordinate itself.
  The SVG viewBox bottom center (16,40) is placed exactly
  on that point, so the visible pin tip cannot drift sideways.
*/
.photo-map-pin {
  width: 32px;
  height: 40px;
  padding: 0;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.photo-map-pin:hover,
.photo-map-pin.is-selected {
  transform: translate(-50%, -100%);
  box-shadow: none;
}

.photo-map-pin-icon {
  position: absolute;
  inset: 0;
  display: block;
  width: 32px;
  height: 40px;
  overflow: visible;
  filter: drop-shadow(0 4px 5px rgba(18, 58, 80, .28));
}

.photo-map-pin-shape {
  fill: var(--marker-color, var(--blue));
  stroke: rgba(255, 255, 255, .98);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.photo-map-pin-hole {
  fill: #fff;
}

.photo-map-pin.is-selected .photo-map-pin-icon {
  filter:
    drop-shadow(0 0 0 rgba(0,0,0,0))
    drop-shadow(0 0 4px var(--marker-color))
    drop-shadow(0 5px 7px rgba(18, 58, 80, .30));
}

/* Disable the old CSS-marker geometry completely. */
.photo-map-pin-dot,
.photo-map-pin-dot::before,
.photo-map-pin-dot::after {
  display: none !important;
}

.photo-map-pin-caption {
  top: 7px;
  left: calc(100% + 8px);
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.35;
}

/* Main controls */
.photo-map-view-tabs button {
  font-size: 15px;
}

.photo-map-control-label {
  font-size: 12px;
}

.photo-map-search-mode button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 12px;
}

.photo-map-filters button {
  min-height: 42px;
  padding: 0 17px;
  font-size: 12px;
}

/* Selected spot panel */
.photo-map-selected-copy {
  padding: 28px;
}

.photo-map-selected-area {
  margin-bottom: 8px;
  font-size: 12px;
}

.photo-map-selected-title h2 {
  font-size: 26px;
  line-height: 1.35;
}

.photo-map-selected-description {
  margin-top: 15px;
  font-size: 15px;
  line-height: 1.85;
}

.photo-spot-type {
  min-height: 23px;
  padding: 0 9px;
  font-size: 10px;
}

.photo-spot-subjects {
  gap: 8px;
  margin-top: 15px;
}

.photo-spot-subject {
  min-height: 29px;
  padding: 0 11px;
  font-size: 11px;
}

.photo-spot-meta {
  gap: 10px 18px;
  margin-top: 15px;
}

.photo-spot-meta-item {
  gap: 3px;
}

.photo-spot-meta-item small {
  font-size: 10px;
  line-height: 1.4;
}

.photo-spot-meta-item strong {
  font-size: 12px;
  line-height: 1.45;
}

.photo-spot-detail,
.photo-spot-list-copy > a {
  margin-top: 15px;
  font-size: 12px;
  line-height: 1.5;
}

/* List view */
.photo-map-list-head h2 {
  font-size: 25px;
}

.photo-map-list-modes button {
  min-height: 40px;
  font-size: 12px;
}

.photo-map-list-group-heading p {
  font-size: 10px;
}

.photo-map-list-group-heading h3 {
  font-size: 21px;
}

.photo-map-list-group-heading small,
.photo-map-list-group-heading > span {
  font-size: 11px;
}

.photo-spot-card h3,
.photo-spot-list-card h3 {
  font-size: 18px;
}

.photo-spot-card-copy > p,
.photo-spot-list-copy > p {
  font-size: 13px;
  line-height: 1.8;
}

/* Legend */
.photo-map-legend {
  padding: 19px 22px;
}

.photo-map-legend h2 {
  margin-bottom: 13px;
  font-size: 17px;
}

.photo-map-legend-grid {
  gap: 16px;
}

.photo-map-legend-grid strong {
  font-size: 12px;
}

.photo-map-legend-grid small {
  font-size: 10px;
  line-height: 1.65;
}

@media (max-width: 680px) {
  .photo-map-view-tabs button {
    font-size: 14px;
  }

  .photo-map-control-label,
  .photo-map-search-mode button,
  .photo-map-filters button {
    font-size: 11px;
  }

  .photo-map-selected-copy {
    padding: 22px;
  }

  .photo-map-selected-title h2 {
    font-size: 23px;
  }

  .photo-map-selected-description {
    font-size: 14px;
  }

  .photo-map-legend-grid strong {
    font-size: 11px;
  }

  .photo-map-legend-grid small {
    font-size: 9px;
  }
}

