/* Traveller Discovery business pages — scoped so other StarDAO shells stay unchanged. */

.discovery-page {
  padding-bottom: 88px;
}

.discovery-page .discovery-crumbs {
  padding-bottom: 8px;
}

.discovery-page .discovery-crumbs .breadcrumbs {
  margin-bottom: 0;
}

.discovery-wide {
  width: min(1180px, calc(100% - 32px));
}

/* Compact geolocated locator card (was full-width island band). */
.discovery-map-band {
  padding: 4px 0 26px;
}
.discovery-map-band .container {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  grid-template-areas: "frame legend";
  column-gap: clamp(18px, 3vw, 34px);
  align-items: center;
}

/* heading copy removed visually (kept for screen readers / aria-labelledby) */
.discovery-map-head {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.discovery-map-frame {
  grid-area: frame;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #d9eef7 url('/assets/media/hainan-isle-art.jpg') no-repeat center / cover;
  background-position: 54% 46%;
  box-shadow: var(--shadow);
}

.hainan-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* art base replaces the schematic island */
.hainan-sea { fill: transparent; }
.hainan-island { fill: none; stroke: none; }

/* small map = scaled viewBox; bump internal glyphs/geometry so they stay legible */
.hainan-city-dot { fill: #5a7280; r: 9px; stroke: #ffffff; stroke-width: 8px; }
.hainan-city.is-active .hainan-city-dot { fill: #0a7cae; r: 13px; }
.hainan-city-label {
  fill: #16313c;
  font-size: 46px;
  font-weight: 800;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 12px;
  stroke-linejoin: round;
  font-family: Inter, "PingFang SC", "Noto Sans SC", sans-serif;
}

.hainan-pin-dot { fill: #0a7cae; r: 13px; stroke: #ffffff; stroke-width: 8px; }
.hainan-pin-nearby .hainan-pin-dot { fill: #1e9cc9; opacity: 0.95; r: 11px; }
.hainan-pin-halo { fill: rgba(255, 255, 255, 0.55); r: 34px; }
.hainan-pin-label {
  fill: #16313c;
  font-size: 42px;
  font-weight: 800;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 11px;
  stroke-linejoin: round;
  font-family: Inter, "PingFang SC", "Noto Sans SC", sans-serif;
}
.hainan-pin-link { cursor: pointer; }

/* duplicate zoom map retired; keep the nearby list */
.discovery-map-inset {
  grid-area: legend;
  margin-top: 2px;
  border: none;
  background: transparent;
}
.hainan-inset-svg { display: none; }

.discovery-map-legend {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  display: grid;
  gap: 6px;
}

.discovery-map-legend li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.discovery-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #1e9cc9;
  flex: 0 0 auto;
  transform: translateY(-1px);
}

.discovery-legend-dot.is-current { background: #0a7cae; box-shadow: 0 0 0 4px rgba(10, 124, 174, 0.16); }
.discovery-legend-kind {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 4em;
}

.discovery-map-credit { display: none; }

/* compact illustration credit on the art */
.discovery-map-frame::after {
  content: "Illustrative art map · Pins from StarDAO catalogue";
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(255, 255, 255, 0.85);
  color: #5a7280;
  font-size: 10px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  pointer-events: none;
}
html[lang^="zh"] .discovery-map-frame::after {
  content: "示意插画地图 · 钉点来自 StarDAO 目录";
}

@media (max-width: 760px) {
  .discovery-map-band .container {
    grid-template-columns: 1fr;
    grid-template-areas: "frame" "legend";
    row-gap: 10px;
  }
  .discovery-map-frame { max-width: 340px; }
}

.discovery-hero {
  padding-top: 8px;
}

.discovery-hero-copy h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 14px 0 8px;
  overflow-wrap: anywhere;
}

.discovery-alt-name {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 18px;
}

.discovery-pitch {
  margin: 0;
  max-width: 68ch;
  font-size: 18px;
  line-height: 1.65;
}

.discovery-section {
  padding-top: 8px;
}

.discovery-section-head h2,
.discovery-about h2,
.discovery-visitor h2,
.discovery-location h2,
.discovery-explore-title {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.discovery-section-head p,
.discovery-about p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.discovery-about p,
.discovery-address-line {
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
  max-width: 72ch;
}

.discovery-gallery {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
  min-height: 360px;
}

.discovery-gallery-strip {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.discovery-gallery.is-duo .discovery-gallery-strip {
  grid-template-rows: 1fr;
}

.discovery-gallery .discovery-photo {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  min-height: 0;
}

.discovery-gallery.is-single {
  grid-template-columns: 1fr;
  min-height: 0;
}

.discovery-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 160px;
}

.discovery-why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.discovery-why-card {
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.discovery-why-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.4;
}

.discovery-source {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.discovery-source a { color: var(--blue); }

.discovery-info-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.discovery-info-row {
  display: grid;
  grid-template-columns: minmax(88px, 140px) 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.discovery-info-row dt {
  color: var(--muted);
  font-weight: 700;
}

.discovery-info-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.discovery-info-row a { color: var(--blue); font-weight: 600; }

.discovery-trust {
  margin-top: 22px;
  padding-top: 8px;
}

.discovery-trust h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.discovery-trust p,
.discovery-trust li {
  color: var(--muted);
}

.discovery-trust ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.discovery-trust a { color: var(--blue); }

.discovery-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.discovery-related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  min-height: 88px;
}

.discovery-related-card strong {
  overflow-wrap: anywhere;
}

.discovery-related-card span {
  color: var(--muted);
  font-size: 13px;
}

.discovery-explore-group + .discovery-explore-group {
  margin-top: 28px;
}

.discovery-explore-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.discovery-explore-links a {
  color: var(--blue);
  font-weight: 600;
}

.discovery-sticky-cta {
  display: none;
}

@media (max-width: 900px) {
  .discovery-why-grid,
  .discovery-related-grid {
    grid-template-columns: 1fr;
  }

  .discovery-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 720px) {
  .discovery-page {
    padding-bottom: 96px;
  }

  .hainan-map-svg { min-height: 200px; }

  .discovery-gallery,
  .discovery-gallery.is-duo {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .discovery-gallery .discovery-photo.is-hero img {
    min-height: 220px;
  }

  .discovery-gallery-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    grid-template-rows: none;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .discovery-gallery-strip .discovery-photo {
    flex: 0 0 72vw;
    min-height: 140px;
  }

  .discovery-sticky-cta {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(247, 244, 236, 0.94);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(12px);
  }

  .discovery-sticky-cta .btn {
    flex: 1;
  }
}

/* ============================================================
   Business entity pages — 2026-09 reference structure
   (location-graph breadcrumb, GEO answer, facts card, lower map)
   ============================================================ */

/* hero: breadcrumb sits above the H1 inside the same section */
.discovery-hero .discovery-crumbs {
  margin: 0 0 14px;
}

.discovery-subtitle {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
}

.discovery-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 76ch;
}

/* generic section heading used by nearby / explore / listings */
.discovery-section-title {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.discovery-section-lead {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* facts card actions (mobile-obvious) */
.discovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.discovery-actions .btn {
  flex: 0 0 auto;
}

/* why prose */
.discovery-why-prose {
  margin: 0;
  max-width: 72ch;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

/* lower map band: visible heading + frame + nearby legend */
.discovery-map-lower .discovery-map-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  gap: clamp(16px, 3vw, 30px);
  align-items: start;
}
.discovery-map-lower .discovery-map-frame {
  max-width: none;
}
.discovery-map-lower .discovery-map-inset {
  grid-area: auto;
  margin: 0;
}
.discovery-map-lower .discovery-map-credit {
  display: block;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* FAQ */
.discovery-faq-item h3 {
  margin: 16px 0 6px;
  font-size: 17px;
  line-height: 1.45;
}
.discovery-faq-item:first-of-type h3 {
  margin-top: 0;
}
.discovery-faq-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
  max-width: 72ch;
}

/* sources / trust block (discreet, bottom of page) */
.discovery-sources p,
.discovery-sources li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}
.discovery-sources .discovery-sources-checked {
  color: var(--text);
  font-weight: 600;
}
.discovery-sources ul {
  margin: 10px 0;
  padding-left: 18px;
}
.discovery-sources a {
  color: var(--blue);
}
.discovery-sources .discovery-sources-note {
  margin: 10px 0 0;
  font-size: 13px;
}
.discovery-sources .discovery-sources-correct {
  margin: 8px 0 0;
  font-size: 14px;
}

/* continue-exploring tag groups */
.discovery-explore-group {
  margin: 0 0 18px;
}
.discovery-explore-group h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.discovery-explore-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.discovery-explore-tags a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.discovery-explore-tags a:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}
.discovery-explore-tags a .count {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

/* taxonomy / place / category listing pages */
.discovery-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.discovery-listing-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.discovery-listing-card:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}
.discovery-listing-card strong {
  font-size: 17px;
  line-height: 1.4;
}
.discovery-listing-meta {
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}
.discovery-listing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.discovery-listing-cta {
  margin-top: auto;
  padding-top: 4px;
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
}
.discovery-subchips {
  margin: 4px 0 10px;
}

@media (max-width: 900px) {
  .discovery-map-lower .discovery-map-band-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .discovery-actions .btn {
    flex: 1 1 140px;
    text-align: center;
  }
  .discovery-listing-grid {
    grid-template-columns: 1fr;
  }
}


/* ---- mobile + readability refinements (2026-09 QA pass) ---- */
.discovery-page .breadcrumbs,
.discovery-hero .breadcrumbs {
  font-size: 14px;
}
.discovery-page .breadcrumbs a,
.discovery-page .breadcrumbs span {
  padding: 2px 0;
  line-height: 1.7;
}
.discovery-page .breadcrumbs a {
  color: var(--text);
}

.discovery-section {
  padding-top: 24px;
}
.discovery-hero {
  padding-bottom: 6px;
}

.discovery-faq-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.discovery-faq-item:last-child {
  border-bottom: none;
}
.discovery-faq-item h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

/* sticky action bar: solid, high-contrast, safe-area aware */
.discovery-sticky-cta {
  background: var(--panel-strong);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(10, 48, 68, 0.08);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

@media (max-width: 720px) {
  .discovery-hero-copy h1 {
    font-size: clamp(34px, 9vw, 44px);
  }
  .discovery-section-head h2,
  .discovery-about h2,
  .discovery-visitor h2,
  .discovery-location h2,
  .discovery-faq h2,
  .discovery-sources h2,
  .discovery-section-title {
    font-size: 23px;
  }
  .discovery-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .discovery-actions .btn {
    width: 100%;
    text-align: center;
    padding: 13px 16px;
    font-size: 16px;
  }
  .discovery-map-lower .discovery-map-band-inner {
    grid-template-columns: 1fr;
  }
  .discovery-map-lower .discovery-map-frame {
    width: 100%;
    max-width: none;
  }
  .discovery-info-row {
    padding: 10px 0;
  }
}

/* taxonomy page (no sticky bar → less reserved bottom padding) */
.discovery-taxonomy {
  padding-bottom: 48px;
}
.discovery-listing-meta {
  font-weight: 700;
  font-size: 13.5px;
}


/* ============================================================
   2026-09 entity-page spacing polish (QA feedback)
   ============================================================ */
.discovery-related-card {
  padding: 18px 18px 16px;
  min-height: 96px;
  justify-content: center;
}
.discovery-related-card strong {
  line-height: 1.45;
}
.discovery-related-card span {
  line-height: 1.6;
  margin-top: 2px;
}

.discovery-faq-item {
  padding: 12px 0 10px;
}
.discovery-faq-item h3 {
  margin: 0 0 6px;
}
.discovery-faq-item p {
  padding-bottom: 2px;
}

/* map band: frame and legend start from the same top line */
.discovery-map-lower .discovery-map-band-inner {
  align-items: start;
}
.discovery-map-lower .discovery-map-frame {
  align-self: start;
}
.discovery-map-lower .discovery-map-inset {
  padding-top: 2px;
}


/* map band stacking — authoritative (same file as base rule) */
@media (min-width: 901px) {
  .discovery-map-lower .discovery-map-band-inner {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  }
}
@media (max-width: 900px) {
  .discovery-map-lower .discovery-map-band-inner {
    display: block;
  }
  .discovery-map-lower .discovery-map-frame {
    width: 100%;
    max-width: none;
  }
  .discovery-map-lower .discovery-map-inset {
    display: block;
    width: 100%;
    margin-top: 12px;
  }
  .discovery-map-lower .discovery-map-legend {
    max-width: none;
  }
}


/* real Google Maps embed at the top of business pages */
.discovery-topmap {
  margin: 4px 0 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.discovery-topmap iframe {
  display: block;
  width: 100%;
  height: clamp(240px, 36vw, 360px);
  border: 0;
  background: #edf2f4;
}
.discovery-topmap-note {
  margin: 0;
  padding: 9px 14px 11px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  align-items: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.discovery-topmap-note a {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.discovery-topmap-note a:hover {
  text-decoration: underline;
}
@media (max-width: 720px) {
  .discovery-topmap {
    margin-top: 2px;
  }
  .discovery-topmap iframe {
    height: 250px;
  }
}


/* top image gallery (replaces the map where genuine photos exist) */
.discovery-topgallery {
  margin: 4px 0 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.discovery-ggrid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}
.discovery-topgallery .discovery-gmain {
  width: 100%;
  height: clamp(260px, 38vw, 420px);
  min-height: 0;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.discovery-gthumbs {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 10px;
  min-height: 0;
}
.discovery-gthumb {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.discovery-topgallery-note {
  margin: 0;
  padding: 10px 16px 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12.5px;
}
.discovery-topgallery-note em {
  font-style: normal;
  color: var(--faint);
}
@media (max-width: 900px) {
  .discovery-ggrid {
    grid-template-columns: 1fr;
  }
  .discovery-topgallery .discovery-gmain {
    height: clamp(220px, 52vw, 320px);
  }
  .discovery-gthumbs {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
  }
  .discovery-gthumb {
    height: 130px;
  }
}


/* destination context panel + dynamic distances */
.discovery-area p {
  margin: 0 0 12px;
}
.discovery-area-facts {
  list-style: none;
  margin: 4px 0 6px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.discovery-area-facts li {
  padding-left: 22px;
  position: relative;
  line-height: 1.75;
  color: var(--muted);
}
.discovery-area-facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}
.discovery-area-src {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px dotted rgba(10, 124, 174, 0.45);
}
.discovery-area-more {
  margin: 14px 0 0 !important;
}
.discovery-area-more a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.discovery-area-more a:hover {
  text-decoration: underline;
}

.discovery-nearby-group + .discovery-nearby-group {
  margin-top: 30px;
}
.discovery-related-card {
  align-items: flex-start;
}
.discovery-rel-dist {
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.discovery-rel-dist::before {
  content: "↔";
  opacity: 0.7;
}


/* back-link to the full directory, above the breadcrumb */
.discovery-alllink {
  margin: 0 0 8px;
}
.discovery-alllink a {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 5px 12px 5px 10px;
  border: 1px solid #cfd9de;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}
.discovery-alllink a:hover {
  border-color: var(--accent);
}
