:root {
  --bg: #0d1018;
  --surface: #151b2b;
  --elev: #1f2940;
  --border: #2e3b59;
  --text: #f3f5fa;
  --muted: #a8b6cf;
  --primary: #c81e68;
  --primary-hi: #ff85b8;
  --accent: #ffb454;
  --ok: #38e8b0;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary-hi);
  text-decoration: none;
}

a:hover {
  color: var(--text);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary-hi);
  outline-offset: 2px;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
}

button {
  cursor: pointer;
}

code {
  background: var(--elev);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

/* Header & Footer */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--text);
  font-weight: 900;
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--elev);
  border-color: var(--primary-hi);
  text-decoration: none;
}

.site-nav a.nav-cta {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text);
}

.site-footer {
  margin-top: 48px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 560px;
}

.footer-brand strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-brand p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-hi);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: var(--text);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--elev);
  border-color: var(--primary-hi);
  color: var(--text);
  text-decoration: none;
}

.btn-secondary {
  background: var(--elev);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary-hi);
  color: var(--text);
  text-decoration: none;
}

.btn-ghost {
  min-height: 36px;
  padding: 4px 12px;
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--primary-hi);
}

[data-gf-like][data-gf-liked],
[data-gf-like][aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary-hi);
  color: var(--text);
}

/* Home Layout & Interactive Atlas */
.home-main {
  width: 100%;
}

.home-content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 0;
}

#atlas {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 58px);
  height: calc(100svh - 58px);
  min-height: 540px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

#atlas:fullscreen {
  height: 100dvh;
}

#mapBar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 8;
  flex-wrap: wrap;
}

#mapBar h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

#searchBoxWrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 420px;
}

#lookup {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

#lookup::placeholder {
  color: var(--muted);
}

#results2 {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
}

#results2:empty {
  display: none;
}

#atlas .place {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  text-align: left;
  font-size: 14px;
}

#atlas .place:hover,
#atlas .place.kbActive {
  background: var(--elev);
}

#atlas .place small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

#atlas .place mark {
  background: var(--accent);
  color: var(--bg);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

#atlas .place.catMatch {
  background: var(--elev);
  color: var(--primary-hi);
  font-weight: 700;
}

.map-bar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

#sideStats {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

#mobileFilterBtn {
  display: none;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--elev);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

#atlasStage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#atlas aside {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(344px, 88vw);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-columns: 48px 1fr;
  z-index: 6;
  transition: transform 0.18s ease;
  box-shadow: var(--shadow-lg);
}

#atlas.fold aside {
  transform: translateX(-100%);
}

#rail {
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 4px;
  overflow-y: auto;
}

#rail button {
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
}

#rail button:hover,
#rail button.active {
  background: var(--elev);
  color: var(--text);
  border-color: var(--primary-hi);
}

#rail svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

#sideInner {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

#sideTop {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

#profileBar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

#profileSel {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

#profileRenameBtn {
  width: 36px;
  height: 36px;
  background: var(--elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 14px;
  padding: 0;
}

#progressTrack {
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

#progressFill {
  height: 100%;
  width: 0;
  background: var(--ok);
  transition: width 0.25s ease;
}

#quickPicks {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

#quickPicks button {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

#quickPicks button:hover,
#quickPicks button.active {
  border-color: var(--primary-hi);
}

#quickPicks button.active {
  background: var(--primary);
}

.filterBtns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 6px;
  margin-top: 8px;
}

.filterBtns button {
  min-height: 36px;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.filterBtns button.active {
  background: var(--primary);
  border-color: var(--primary-hi);
}

#sideScroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
}

#atlas details.filterGroup {
  border-top: 1px solid var(--border);
}

#atlas .filterGroup summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  list-style: none;
}

#atlas .filterGroup summary::-webkit-details-marker {
  display: none;
}

#atlas .filterGroup summary input {
  margin-left: auto;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-hi);
  cursor: pointer;
}

#atlas .filterRow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

#atlas .filterRow:hover {
  background: var(--elev);
}

#atlas .filterMain {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  padding: 4px 0;
}

#atlas .filterMain input {
  position: absolute;
  opacity: 0;
  width: 1px;
  pointer-events: none;
}

#atlas .filterRow:has(.filterMain input:not(:checked)) .filterMain {
  opacity: 0.42;
}

.cat-svg-badge {
  width: 20px;
  height: 24px;
  flex-shrink: 0;
}

#atlas .filterName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#atlas .filterRow small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#atlas .catListBtn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

#atlas .catListBtn:hover,
#atlas .catListBtn.active {
  color: var(--primary-hi);
  background: var(--bg);
}

#atlas .catSubList {
  display: flex;
  flex-direction: column;
  max-height: 230px;
  overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 4px 6px;
  gap: 2px;
}

#atlas .subRow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 2px 4px;
  border-radius: 6px;
}

#atlas .subRow:hover {
  background: var(--elev);
}

#atlas .subChk {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

#atlas .subChk.done {
  border-color: var(--ok);
}

#atlas .subLoc {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  padding: 4px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

#atlas .subLoc.done {
  color: var(--muted);
  text-decoration: line-through;
  opacity: 0.68;
}

#atlas .subMore {
  border: 0;
  background: var(--surface);
  color: var(--primary-hi);
  font-size: 12px;
  font-weight: 700;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

#atlas .filterNext {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 14px;
}

#atlas .filterNext:hover {
  background: var(--elev);
  color: var(--primary-hi);
}

#sideFoot {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
}

#sideFoot button {
  min-height: 36px;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

#sideFoot button:hover,
#sideFoot button.active {
  background: var(--primary);
  border-color: var(--primary-hi);
}

/* Map Viewport & Controls */
#viewport {
  position: absolute;
  inset: 0 0 0 min(344px, 88vw);
  background: var(--bg);
  overflow: hidden;
  touch-action: none;
  transition: left 0.18s ease;
}

#atlas.fold #viewport {
  left: 0;
}

#mapCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

#drawer {
  position: absolute;
  left: min(344px, 88vw);
  top: 12px;
  z-index: 7;
  width: 44px;
  height: 44px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  transition: left 0.18s ease;
  box-shadow: var(--shadow-sm);
}

#atlas.fold #drawer {
  left: 0;
  border-left: 1px solid var(--border);
}

#atlas nav.map-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
  display: grid;
  gap: 8px;
}

#atlas nav.map-controls button {
  width: 44px;
  height: 44px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
  padding: 0;
  box-shadow: var(--shadow-sm);
}

#atlas nav.map-controls button:hover,
#atlas nav.map-controls button.active {
  background: var(--primary);
  border-color: var(--primary-hi);
}

#atlas nav.map-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}

#atlas nav.map-controls button#embedBtn {
  font-size: 13px;
  font-weight: 800;
}

html.gf-embed .site-header,
html.gf-embed .site-footer,
html.gf-embed #mobileScrollHint,
html.gf-embed .home-content {
  display: none;
}

html.gf-embed #atlas {
  height: 100dvh;
  min-height: 360px;
  max-height: none;
  border-bottom: 0;
}

html.gf-ios-fs,
html.gf-ios-fs body {
  overflow: hidden;
}

html.gf-ios-fs #atlas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  max-height: none;
  z-index: 999;
  border-bottom: 0;
}

.sync-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sync-code-row input {
  flex: 1;
  min-width: 160px;
  min-height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sync-code-row button {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--elev);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.sync-code-row button.primary {
  background: var(--grad);
  border-color: transparent;
}

.poi-nearby {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.near-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.near-chip:hover {
  color: var(--text);
  border-color: var(--primary-hi);
  background: var(--elev);
}

.dir-found-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--elev);
  border: 1px solid var(--ok);
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
}

#layersPanel {
  position: absolute;
  right: 64px;
  top: 12px;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 8;
}

#layersPanel .layersTitle {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

#layersPanel label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

#layersPanel select {
  width: 100%;
  min-height: 36px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 4px 8px;
  font-size: 14px;
}

#mapPending,
#toast,
#placeBanner,
#measureBanner,
#tourBanner,
#sharedPlanBanner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 120px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--primary-hi);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#mapPending,
#toast {
  pointer-events: none;
}

#measureDist,
#tourStepLabel {
  color: var(--accent);
}

#measureBanner button,
#tourBanner button,
#placeBanner button,
#sharedPlanBanner button {
  min-height: 32px;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}

#hoverTip {
  position: absolute;
  pointer-events: none;
  z-index: 8;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -100%);
  margin-top: -12px;
  max-width: 240px;
  white-space: nowrap;
}

#hoverTip strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hoverTip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

#ctxMenu {
  position: absolute;
  min-width: 216px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 11;
}

#ctxHead {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

#ctxHead span {
  display: block;
  color: var(--primary-hi);
  font-size: 12px;
  font-weight: 700;
}

#ctxMenu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  padding: 6px 8px;
  text-align: left;
  font-size: 14px;
}

#ctxMenu button:hover {
  background: var(--elev);
}

#coords {
  position: absolute;
  bottom: 32px;
  right: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  z-index: 3;
  border: 1px solid var(--border);
}

.map-credit {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 4px 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  z-index: 3;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-top-left-radius: 8px;
}

#mobileScrollHint {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-hi);
}

/* Floating Detail Card */
#detail2 {
  position: absolute;
  width: min(336px, calc(100% - 24px));
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 7;
}

#poiPhotoWrap {
  position: relative;
  height: 152px;
  background: var(--bg);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  cursor: zoom-in;
}

#poiPhotoWrap.loading {
  cursor: progress;
  background: linear-gradient(110deg, var(--bg) 25%, var(--elev) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: poiShimmer 1.3s linear infinite;
}

@keyframes poiShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

#poiPhotoStatus {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  z-index: 1;
}

#poiPhotoStatus[hidden] {
  display: none;
}

#poiPhoto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.16s ease;
}

#poiPhotoWrap.loading #poiPhoto,
#poiPhotoWrap.loading #poiPhotoZoom {
  opacity: 0;
  pointer-events: none;
}

#poiPhotoZoom {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

#photoModeBar {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 4px;
  z-index: 2;
}

#photoModeBar button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

#photoModeBar button.active {
  background: var(--primary);
  color: var(--text);
}

#detailBanner {
  position: relative;
  padding: 12px 16px;
  background: var(--elev);
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}

#detail2:has(#poiPhotoWrap:not([hidden])) #detailBanner {
  border-radius: 0;
}

#dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}

#dismiss:hover {
  background: var(--primary);
  border-color: var(--primary-hi);
}

#poiName {
  display: block;
  font-size: 16px;
  font-weight: 800;
  padding-right: 36px;
  color: var(--text);
}

#poiMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

#poiCatBtn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#poiCoordTag {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

#detailBody {
  padding: 12px 16px;
}

#poiText {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 12px;
}

#poiKv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 8px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.confPill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--border);
}

.poiBadges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.confPill[hidden] {
  display: none;
}

.confPill.enterable {
  color: var(--primary-hi);
  border-color: var(--primary-hi);
}

.confPill.verified {
  color: var(--ok);
  border-color: var(--ok);
}

.confPill.unconfirmed {
  color: var(--accent);
  border-color: var(--accent);
}

#markloc {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

#markloc.done {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--bg);
}

#markBox {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 12px;
}

#poiNote {
  width: 100%;
  min-height: 48px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px;
  font-size: 14px;
  margin-bottom: 8px;
}

.poi-guide-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  margin-bottom: 8px;
  background: var(--elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.poi-guide-link:hover {
  background: var(--primary);
  border-color: var(--primary-hi);
  color: var(--text);
  text-decoration: none;
}

.poi-guide-link[hidden] {
  display: none;
}

#detailLinks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

#pointSource {
  color: var(--primary-hi);
  font-weight: 700;
  font-size: 12px;
}

#reportBtn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 4px 0;
  font-size: 12px;
  font-weight: 700;
}

.customActions {
  display: flex;
  gap: 8px;
}

.customActions button {
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

#detailFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
}

.footTools,
.stepTools {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.footTools button,
.stepTools button {
  background: var(--elev);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 14px;
}

#favBtn.active {
  color: var(--accent);
  border-color: var(--accent);
}

#copyMsg {
  font-size: 12px;
  color: var(--ok);
  font-weight: 700;
}

/* Modals */
.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 16px;
}

.modalCard {
  width: min(440px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.modalCard h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.modalCard p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.modalCard label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 10px 0 4px;
}

.modalCard input[type="text"],
.modalCard textarea,
.modalCard select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
}

.swatches {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
}

.swatches button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 0;
}

.swatches button.active {
  border-color: var(--text);
}

.modalBtns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.modalBtns button {
  min-height: 40px;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.modalBtns button.primary {
  background: var(--primary);
  border-color: var(--primary);
}

#lightbox img {
  max-width: min(92vw, 980px);
  max-height: 86vh;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Below-the-fold Content Cards, Directory, Guides & Articles */
.content-section,
.hub-box,
.engage-box,
.doc-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.content-section h2,
.hub-box h2,
.engage-box h2,
.doc-article h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
}

.doc-article h2 {
  margin-top: 32px;
}

.content-section h3,
.hub-box h3,
.engage-box h3,
.doc-article h3 {
  margin: 20px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

.content-section p,
.doc-article p,
.doc-article li {
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  max-width: 72ch;
}

.doc-article ul,
.doc-article ol,
.content-section ul {
  padding-left: 24px;
}

.doc-article li,
.content-section li {
  margin-bottom: 8px;
}

.doc-article img,
.content-section img.feature-map-img {
  display: block;
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 16px 0 20px;
}

.doc-article blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--elev);
  border-left: 4px solid var(--primary-hi);
  border-radius: 8px;
}

.doc-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.doc-article th,
.doc-article td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.doc-article th {
  background: var(--elev);
  font-weight: 700;
}

/* Directory */
#dirTabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

#dirTabs button {
  min-height: 36px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

#dirTabs button.active {
  background: var(--primary);
  border-color: var(--primary-hi);
}

#dirControls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

#dirControls input,
#dirControls select {
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
}

#dirControls input {
  flex: 1;
  min-width: 220px;
}

#dirList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.dirItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.dirItemInfo {
  min-width: 0;
}

.dirItemName {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dirItemMeta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.dirLocate {
  flex-shrink: 0;
  min-height: 36px;
  background: var(--elev);
  color: var(--primary-hi);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.dirLocate:hover {
  background: var(--primary);
  color: var(--text);
}

#dirMoreWrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}

.guideGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.guideCard {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.guideCard h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.guideCard p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.pill-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pill-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pill-links a:hover {
  background: var(--elev);
  border-color: var(--primary-hi);
  text-decoration: none;
}

.geoFaq {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.geoFaq details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.geoFaq summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.geoFaq summary::-webkit-details-marker {
  display: none;
}

.geoFaq details p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Inner Doc Pages */
.doc-main {
  max-width: 920px;
  margin: 32px auto 0;
  padding: 0 20px;
}

.doc-article h1 {
  margin: 8px 0 12px;
  font-size: 36px;
  line-height: 1.18;
  font-weight: 800;
  color: var(--text);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.meta-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.meta-pills span {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.meta-pills span.status-pill {
  color: var(--accent);
  border-color: var(--accent);
}

.mini-toc {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px;
  margin: 16px 0 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.mini-toc strong {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.mini-toc a {
  background: var(--elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.doc-map-box {
  margin-top: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.doc-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--elev);
  border-bottom: 1px solid var(--border);
}

.doc-map-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.doc-map-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.doc-map-head-btns {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.doc-map-mini-btn {
  padding: 6px 12px;
  min-height: 34px;
  font-size: 13px;
}

.doc-map-ext {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-hi);
}

.doc-map-stage,
.doc-map-stage.is-live {
  position: relative;
  width: 100%;
  height: 380px;
  background: radial-gradient(circle at 50% 35%, var(--elev) 0%, var(--bg) 78%);
}

.doc-map-poster {
  width: 100%;
  height: 380px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
}

.doc-map-poster:hover .doc-map-play-pill {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.doc-map-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.doc-map-poster-title {
  font-size: 20px;
  line-height: 1.3;
  max-width: 560px;
}

.doc-map-poster-sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 540px;
}

.doc-map-play-pill {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--grad);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.doc-map-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.tool-main {
  max-width: 1120px;
}

.tool-hero-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}

.tool-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tool-h1 {
  margin: 4px 0 6px;
  font-size: 32px;
  line-height: 1.2;
}

.tool-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  max-width: 78ch;
}

.notfound-search {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}

.notfound-search input {
  flex: 1;
  min-width: 240px;
  min-height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 14px;
  font-size: 16px;
}

/* Comments & Engagement */
.engage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.engage-head h2 {
  margin: 0;
}

.engage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.engage-status {
  font-size: 14px;
  color: var(--ok);
  font-weight: 600;
}

.comment-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.comment-form[data-gf-replying] .reply-bar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.form-row {
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.field-label input,
.field-label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comments-heading {
  margin: 0 0 12px;
  font-size: 18px;
}

.comment-list,
.reply-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.reply-list {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

.comment-list[data-gf-empty]::before {
  content: "No field notes on this page yet. Spotted a missing safe, stunt jump, towable ATM, or street shortcut? Drop the district and clue above—no account needed.";
  display: block;
  padding: 16px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.comment-item {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.comment-item[data-gf-owner] {
  border-color: var(--primary-hi);
  background: var(--elev);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 6px;
}

.comment-author {
  color: var(--text);
}

.owner-badge {
  background: var(--primary);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.comment-reply-target {
  color: var(--primary-hi);
  font-size: 12px;
}

.comment-time {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

.comment-body {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  white-space: pre-wrap;
}

/* Mobile Responsive */
@media (max-width: 720px) {
  .header-inner {
    padding: 10px 16px;
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .site-nav a {
    white-space: nowrap;
  }

  #atlas {
    height: 66dvh;
    min-height: 460px;
    max-height: 580px;
  }

  #mapBar {
    padding: 8px 12px;
  }

  #mapBar h1 {
    font-size: 16px;
  }

  #searchBoxWrap {
    order: 3;
    min-width: 100%;
    max-width: none;
  }

  #mobileFilterBtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  #atlas aside {
    width: min(320px, 88vw);
  }

  #drawer {
    left: min(320px, 88vw);
  }

  #atlas.fold #drawer {
    left: 0;
  }

  #viewport {
    left: 0;
  }

  #atlas nav.map-controls {
    right: 8px;
    top: 8px;
    gap: 6px;
  }

  #atlas nav.map-controls button {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  #larger,
  #smaller,
  #embedBtn,
  #aboutBtn {
    display: none !important;
  }

  #detail2 {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    top: auto !important;
    width: auto !important;
    max-height: 46dvh;
    overflow-y: auto;
  }

  #poiPhotoWrap {
    height: 120px;
  }

  #mobileScrollHint {
    display: flex;
  }

  .doc-article h1 {
    font-size: 28px;
  }

  .content-section,
  .hub-box,
  .engage-box,
  .doc-article {
    padding: 16px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .doc-map-mini-btn {
    width: auto;
  }

  .doc-map-stage.is-live {
    height: 380px;
  }

  .tool-hero-shell {
    padding: 16px;
  }

  .tool-h1 {
    font-size: 26px;
  }
}

.tool-top-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#routePinBtn.active{background:var(--primary);border-color:var(--primary-hi);color:var(--text)}

/* v53 Comprehensive Mobile, Banner, Embed & Overflow Fixes */
html, body {
  max-width: 100%;
  overflow-x: clip;
}
.doc-main, .tool-main, .doc-article, .tool-hero-shell, .hub-box, .engage-box {
  min-width: 0;
  max-width: 100%;
}
.doc-article table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#measureBanner {
  top: 8px;
  padding: 5px 10px;
  gap: 6px;
  font-size: 12px;
  max-width: calc(100% - 68px);
  z-index: 25;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
#measureBanner::-webkit-scrollbar {
  display: none;
}
#measureBanner button {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
#toast {
  top: auto !important;
  bottom: 36px;
  z-index: 29;
  pointer-events: none;
  font-size: 13px;
  padding: 6px 12px;
  white-space: nowrap;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.gf-embed #measureBtn,
.gf-embed #embedBtn,
.gf-embed #aboutBtn {
  display: none !important;
}
@media (max-width: 720px) {
  #mobileFilterBtn {
    min-width: 146px;
    justify-content: center;
  }
  #atlas aside {
    width: min(280px, 76vw);
  }
  #drawer {
    left: min(280px, 76vw);
    top: 56px;
  }
  #measureBanner {
    left: 8px;
    right: 54px;
    transform: none;
    max-width: none;
  }
  #detail2 {
    bottom: 28px !important;
    max-height: 44dvh !important;
  }
}

.gf-embed nav.map-controls{gap:4px !important}.gf-embed nav.map-controls button{width:32px !important;height:32px !important;font-size:14px !important}

.safe-chip { border-color: #ffb454; color: #ffb454; background: rgba(255,180,84,0.12); font-family: ui-monospace, monospace; font-weight: 700; }
.verify-chip.done { border-color: #38e8b0; color: #38e8b0; background: rgba(56,232,176,0.12); }

#quickPicks .qp-link {
  display: inline-flex; align-items: center; text-decoration: none;
  background: rgba(200,30,104,0.22); border: 1px solid var(--primary-hi);
  color: var(--text); padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
#quickPicks .qp-link:hover { background: var(--primary); }

/* v65-ux-polish */
#quickPicks {
  display: grid !important;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: max-content;
  gap: 5px !important;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
#quickPicks .qp-preset {
  border-color: rgba(255, 180, 84, 0.55);
  color: #ffd68a;
}
#quickPicks .qp-preset.active {
  background: #c81e68;
  border-color: #ff85b8;
  color: #fff;
}
.map-lang-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.map-lang-pills a {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
}
.map-lang-pills a:hover {
  color: var(--text);
  border-color: var(--primary-hi);
}
#sheetSizeBtn {
  display: none;
  position: absolute;
  top: 8px;
  right: 46px;
  z-index: 5;
  width: 32px;
  height: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
#detailFoot {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  z-index: 4;
}
.site-nav a[data-dle-nav] {
  border: 1px solid rgba(56, 232, 176, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(56, 232, 176, 0.1);
}
@media (max-width: 720px) {
  #atlas {
    height: 78vh !important;
    height: 78svh !important;
    min-height: 500px !important;
    max-height: 760px !important;
  }
  #mapBar {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  #mapBar h1 {
    font-size: 15px !important;
  }
  #sideStats {
    display: none;
  }
  #sheetSizeBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #detail2 {
    border-radius: 14px !important;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.65) !important;
    transition: max-height 0.2s ease;
  }
  #detail2.sheet-expanded {
    max-height: 78dvh !important;
  }
  #poiPhotoWrap {
    height: 112px !important;
  }
}

/* v66-zero-cls-hero-map */
.doc-map-hero {
  margin: 10px 0 18px !important;
}
.doc-article > h1 + p {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  margin: 6px 0 14px;
}
@media (max-width: 720px) {
  .doc-map-stage,
  .doc-map-stage.is-live,
  .doc-map-poster {
    height: 320px !important;
    min-height: 320px !important;
  }
  .doc-map-head {
    padding: 8px 12px !important;
  }
}

/* v67-hot-funnel-cards */
.doc-article blockquote:has(ul) {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(13, 16, 24, 0.92);
  border: 1.5px solid rgba(255, 133, 184, 0.5);
  border-left: 4px solid var(--primary-hi);
  margin: 22px 0;
}
.doc-article blockquote > p:first-child {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}
.doc-article blockquote ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 10px;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.doc-article blockquote ul li {
  margin: 0 !important;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.45;
}
.doc-article blockquote ul li:hover {
  border-color: var(--primary-hi);
}
.doc-article blockquote ul li a {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-hi);
  text-decoration: none;
  margin-bottom: 3px;
}


/* v68-4-core-gaps */
#mapLangSel {
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--elev);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
#quickPicks button.qp-daily {
  border-color: rgba(56, 232, 176, 0.65);
  background: rgba(56, 232, 176, 0.14);
  color: var(--ok);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#quickPicks button.qp-daily small {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(13, 16, 24, 0.72);
  color: var(--text);
}
#quickPicks button.qp-daily.active {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--bg);
}
#quickPicks button.qp-daily.active small {
  background: rgba(13, 16, 24, 0.88);
  color: var(--ok);
}
.poi-ugc-tips {
  margin: 0 0 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(56, 232, 176, 0.08);
  border: 1px solid rgba(56, 232, 176, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.poi-ugc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ok);
}
.poi-ugc-item {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.poi-ugc-rep {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}


/* v69-zero-cls */
#sideStats {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#dirTabs {
  min-height: 38px;
}
.site-nav a[data-dle-nav] {
  font-variant-numeric: tabular-nums;
}


/* v71-gta6dle-ribbon */
.dle-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 0 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid rgba(56, 232, 176, 0.45);
}
.dle-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.dle-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}
.dle-step:hover {
  color: var(--text);
  border-color: var(--primary-hi);
  text-decoration: none;
}
.dle-step.cur {
  border-color: var(--primary-hi);
  color: var(--text);
  background: rgba(200, 30, 104, 0.22);
}
.dle-step.done {
  border-color: rgba(56, 232, 176, 0.65);
  color: var(--ok);
  background: rgba(56, 232, 176, 0.14);
}
.dle-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.dle-badge {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.dle-copy-btn {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid rgba(56, 232, 176, 0.65);
  background: rgba(56, 232, 176, 0.16);
  color: var(--ok);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.dle-copy-btn:hover {
  background: var(--ok);
  color: var(--bg);
}

/* CLS Zero-Shift Hardening (GPU transform for drawer + stable mobile bar + reserved dir height) */
#drawer {
  left: 0 !important;
  transform: translateX(min(344px, 88vw));
  transition: transform 0.18s ease;
  will-change: transform;
}
#atlas.fold #drawer {
  left: 0 !important;
  transform: translateX(0);
}
#dirList {
  min-height: 480px;
}
@media (max-width: 720px) {
  #drawer {
    left: 0 !important;
    transform: translateX(min(280px, 76vw));
    top: 56px;
  }
  #atlas.fold #drawer {
    left: 0 !important;
    transform: translateX(0);
  }
  .map-bar-meta {
    flex-wrap: nowrap;
    gap: 6px;
  }
  #mobileFilterBtn {
    white-space: nowrap;
  }
}
