/* map-page.css — /map reference page only (enqueued conditionally). */

.pg-map-wrap { max-width: var(--max-w, 1200px); margin: 0 auto; padding: 40px 32px 80px; }

/* Head */
.pg-map-title {
  font-family: var(--serif, serif); font-weight: 700; font-size: 40px;
  line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; color: var(--ink, #1c1a17);
}
.pg-map-intro { font-size: 17px; line-height: 1.7; color: var(--ink-soft, #4a4640); margin: 0 0 12px; }
.pg-map-source { font-size: 13px; color: var(--muted, #8b8780); margin: 0 0 6px; }
.pg-map-source a { color: var(--coral, #d85a30); }
.pg-map-updated {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2, #a39e94); margin: 0 0 32px;
}

/* Map */
.pg-map-figure { margin: 0 0 40px; }
.pg-map-controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.pg-map-toggle { display: inline-flex; gap: 4px; background: #efece4; border-radius: 999px; padding: 4px; }
.pg-map-toggle-btn {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: 7px 16px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #6f6b63;
}
.pg-map-toggle-btn.is-active { background: #fff; color: var(--coral, #d85a30); box-shadow: 0 2px 8px -4px rgba(0,0,0,.3); }
.pg-map-toggle-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-map-tools { display: inline-flex; gap: 6px; }
.pg-map-tool-btn {
  border: 1px solid var(--line, #e4e0d6); background: #fff; cursor: pointer; border-radius: 999px;
  padding: 7px 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #4a4640;
}
.pg-map-tool-btn:hover { border-color: #ccc8be; }
.pg-map-tool-btn.is-active { background: var(--coral, #d85a30); border-color: var(--coral, #d85a30); color: #fff; }

/* Place markers (PinGuide places with coordinates) */
.pg-place-pin {
  width: 30px; height: 38px; cursor: pointer;
  background-repeat: no-repeat; background-position: center bottom; background-size: contain;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
}
.pg-map-canvas {
  width: 100%; height: 460px; border-radius: 14px; overflow: hidden;
  background: #ece7dc; border: 1px solid var(--line, #e4e0d6);
}
.pg-map-fallback, .pg-map-noboundary { font-size: 14px; color: var(--muted, #8b8780); font-style: italic; }
.pg-map-noboundary { margin: 0 0 36px; }

/* Legend for ward types */
.pg-map-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 0; font-size: 12px; color: var(--ink-soft, #4a4640); }
.pg-map-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.pg-map-swatch { width: 13px; height: 13px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.pg-map-poptype { text-transform: uppercase; font-size: 11px; letter-spacing: .06em; color: #888; }

/* Section headings */
.pg-map-h2 {
  font-family: var(--serif, serif); font-weight: 700; font-size: 26px;
  margin: 0 0 18px; color: var(--ink, #1c1a17);
}

/* Table */
.pg-map-table-sec { margin: 0 0 44px; }
.pg-map-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pg-map-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pg-map-table th, .pg-map-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line, #e4e0d6); vertical-align: top;
}
.pg-map-table thead th {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted, #8b8780); border-bottom: 2px solid var(--line, #e4e0d6);
}
.pg-map-table tbody th[scope="row"] { font-weight: 700; color: var(--ink, #1c1a17); white-space: nowrap; }
.pg-map-table tbody tr:target { background: #fbf3ea; }
.pg-map-table a { color: var(--coral, #d85a30); font-weight: 600; }
.pg-map-soon { color: var(--muted-2, #a39e94); font-size: 12px; font-style: italic; }

/* Area cards */
.pg-map-cards-sec { margin: 0 0 44px; }
.pg-map-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pg-map-card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: #fff; border: 1px solid var(--line, #e4e0d6); border-radius: 12px; padding: 16px 18px;
  transition: border-color .15s ease, transform .15s ease;
}
.pg-map-card:hover { border-color: #ccc8be; transform: translateY(-2px); }
.pg-map-card-name { font-family: var(--serif, serif); font-weight: 700; font-size: 18px; color: var(--ink, #1c1a17); }
.pg-map-card-sub { font-size: 13px; color: var(--muted, #8b8780); }
.pg-map-card-count {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--coral, #d85a30); margin-top: 4px;
}

/* FAQ */
.pg-map-faq-sec { margin: 0 0 44px; }
.pg-map-faq-item { border-bottom: 1px solid var(--line, #e4e0d6); padding: 4px 0; }
.pg-map-faq-q {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative;
  font-weight: 700; font-size: 16px; color: var(--ink, #1c1a17);
}
.pg-map-faq-q::-webkit-details-marker { display: none; }
.pg-map-faq-q::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 20px; color: var(--muted, #8b8780); }
.pg-map-faq-item[open] .pg-map-faq-q::after { content: "\2013"; }
.pg-map-faq-a { padding: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--ink-soft, #4a4640); }
.pg-map-faq-a p { margin: 0 0 .8em; }

.pg-map-body { margin-top: 32px; font-size: 16px; line-height: 1.75; color: var(--ink-soft, #4a4640); }

@media (max-width: 640px) {
  .pg-map-title { font-size: 30px; }
  .pg-map-canvas { height: 340px; }
}
