.map-home-header .map-search-row { display:flex; gap:8px; }
.map-home-header [hidden] { display:none!important; }
.map-home-header .map-search-row input { width:100%; min-width:0; min-height:44px; border:1px solid #cbd5e1; border-radius:9px; padding:9px 11px; font:inherit; font-size:16px; }
.map-home-header .map-small-button { border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#002b5b; font:750 13px/1.2 inherit; cursor:pointer; }
.map-home-header .map-small-button.primary { background:#002b5b; color:white; }
.map-home-header { gap:12px; padding:0 20px; background:#fff; color:#0f172a; }
.site-header.map-home-header.is-scrolled { background:#fff; }
.map-home-header .brand { border:0; background:transparent; padding:0; }
.map-home-header .brand img { width:48px; }
.map-home-header .nav-login { border-color:#002b5b; background:#002b5b; color:#fff; }
.subpage-body .footer-nav-grid,.subpage-body .footer-cta { display:none; }
.subpage-body .footer-main { grid-template-columns:minmax(0,1fr) minmax(220px,.45fr); }
.map-home-header .brand { flex-shrink:0; }
.map-home-header .brand span { color:#002b5b; }
.map-home-header .header-actions { gap:8px; flex-shrink:0; }
.map-home-header .nav-login { min-height:44px; padding:8px 12px; }
.map-home-header .map-small-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; white-space:nowrap; }
.map-home-header .map-search-form { flex:1; max-width:650px; margin:0; }
.map-home-header .map-search-status { position:absolute; top:100%; left:20px; right:20px; background:#fff; padding:6px 12px; border-radius:0 0 10px 10px; box-shadow:0 6px 12px #0f172a12; }
[data-map-home] { overflow:auto; }
[data-map-home] .tourcir-map-shell { position:relative; display:block; height:100dvh; padding-top:66px; }
[data-map-home] .map-stage { position:absolute; inset:66px 0 0; scroll-margin-top:66px; }
[data-map-home] .map-controls { position:absolute; left:16px; top:82px; bottom:20px; width:330px; border:1px solid #e2e8f0; border-radius:16px; padding:18px; box-shadow:0 10px 36px #0f172a18; }
[data-map-home] .map-controls[hidden] { display:none; }
[data-map-home] .map-title-row h1 { font-size:26px; }
[data-map-home] .map-intro { margin:8px 0 14px; }
.home-contribute { padding:12px; margin-bottom:14px; background:#f0fdfa; border-radius:10px; }
.home-contribute p { font-size:12px; color:#475569; margin:8px 0 0; }
.home-about,.home-city-section { max-width:1240px; margin:0 auto; padding:36px 24px; }
.home-about { border-bottom:1px solid #e2e8f0; }
.home-about h2 { margin:8px 0 16px; font-size:clamp(24px,3vw,34px); }
.home-about p:not(.map-eyebrow) { max-width:960px; margin:8px 0; color:#475569; font-size:15px; line-height:1.8; }
.home-city-section { scroll-margin-top:82px; }
.home-city-heading h2 { font-size:26px; margin-bottom:10px; }
.home-city-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:22px; }
.home-city-card { min-width:0; padding:20px; border:1px solid #e2e8f0; border-radius:14px; background:white; }
.home-city-card h3 { color:#002b5b; font-size:18px; margin:0 0 14px; }
.home-board-row { display:flex; align-items:center; justify-content:space-between; width:100%; gap:10px; padding:10px 8px; border:0; border-bottom:1px solid #e2e8f0; background:#fff; color:#0f172a; font:inherit; text-align:left; cursor:pointer; }
.home-board-row:hover { background:#f0fdfa; }
.home-board-row strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.home-board-row small { display:block; color:#64748b; font-size:12px; }
.home-board-row > span:last-child { flex-shrink:0; color:#0f766e; font-size:12px; }
[data-home-board] { display:grid; gap:4px; }
[data-home-board][hidden] { display:none; }
.home-points-rule { font-size:11px; color:#64748b; margin:12px 0 0; line-height:1.6; }
.home-activity-button { position:absolute; left:16px; bottom:20px; z-index:4; box-shadow:0 8px 24px #0f172a18; }
[data-map-home] .map-gesture-hint { top:12px; }
@media(min-width:901px) { [data-map-home]:has(.map-controls:not([hidden])) .home-activity-button { left:366px; } }
@media(max-width:900px) {
  .subpage-body .footer-main { grid-template-columns:1fr; }
  .subpage-body:not([data-map-home]) .subpage-main { padding-top:112px; }
  .map-home-header { min-height:112px; padding:8px 12px; flex-wrap:wrap; gap:8px; }
  .map-home-header .brand { margin-right:auto; min-height:44px; }
  .map-home-header .brand img { width:34px; height:34px; }
  .map-home-header .brand span { display:none; }
  .map-home-header .header-actions { gap:5px; }
  .map-home-header .map-small-button,.map-home-header .nav-login { font-size:13px; padding:7px 10px; }
  .map-home-header .map-search-form { flex-basis:100%; max-width:none; order:3; }
  [data-map-home] .tourcir-map-shell { padding-top:112px; }
  [data-map-home] .map-stage { inset:112px 0 0; scroll-margin-top:112px; }
  .home-about,.home-city-section { padding:28px 16px; }
  .home-city-section { scroll-margin-top:128px; }
  .home-city-grid { grid-template-columns:1fr; gap:14px; }
  [data-map-home] .map-controls { top:auto; bottom:calc(72px + env(safe-area-inset-bottom)); left:12px; right:12px; width:auto; max-height:45dvh; overflow-y:auto; padding:14px; }
  .home-activity-button { bottom:calc(20px + env(safe-area-inset-bottom)); left:12px; }
  [data-map-home] .map-list { max-height:22dvh; }
  [data-map-home] .map-detail-card { max-height:50dvh; }
}

/* Keep the purpose of the map visible beside the logo on every screen size. */
.map-home-header .brand-copy { display:grid; gap:3px; }
.map-home-header .brand-domain { font-size:11px; letter-spacing:.08em; }
.map-home-header .brand-title { font-size:17px; line-height:1.3; letter-spacing:0; }
.home-map-tools { display:none; }
@media(max-width:900px) {
  [data-map-home] .map-home-header { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:44px 44px; min-height:112px; gap:8px; }
  [data-map-home] .map-home-header .brand { grid-area:1 / 1; min-width:0; gap:8px; margin:0; }
  [data-map-home] .map-home-header .brand img { width:30px; height:30px; flex-shrink:0; }
  .map-home-header .brand .brand-copy,.map-home-header .brand .brand-title { display:block; }
  [data-map-home] .map-home-header .brand-title { font-size:clamp(13px,3.8vw,16px); white-space:normal; }
  .map-home-header .brand-domain { display:none; }
  [data-map-home] .map-home-header .header-actions { grid-area:1 / 2; justify-content:flex-end; }
  [data-map-home] .map-home-header .header-actions [data-home-locate],
  [data-map-home] .map-home-header .header-actions [data-home-filter] { display:none; }
  [data-map-home] .map-home-header .map-search-form { grid-area:2 / 1 / 3 / 3; min-width:0; }
  [data-map-home] .tourcir-map-shell { padding-top:112px; }
  [data-map-home] .map-stage { inset:112px 0 0; scroll-margin-top:112px; }
  [data-map-home] .home-city-section { scroll-margin-top:128px; }
  .home-map-tools { display:flex; position:absolute; left:12px; top:12px; gap:8px; z-index:4; }
  .home-map-tools .map-small-button { min-height:44px; padding:8px 12px; background:#fff; box-shadow:0 4px 12px #0f172a18; }
  [data-map-home] .map-gesture-hint { top:66px; max-width:calc(100% - 24px); text-align:center; }
}


/* Compact full-city totals, separate from viewport and search result counts. */
.home-city-banner { position:absolute; left:16px; bottom:72px; z-index:3; max-width:min(560px,calc(100% - 90px)); padding:8px 11px; border-radius:10px; background:#fffffff2; box-shadow:0 4px 14px #0f172a18; pointer-events:none; }
.home-city-banner[hidden] { display:none; }
.home-city-banner p { margin:0; color:#334155; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.home-city-banner [data-home-hosts] { margin-top:3px; color:#0f766e; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.home-city-banner [data-home-hosts][hidden] { display:none; }
@media(min-width:901px) { [data-map-home]:has(.map-controls:not([hidden])) .home-city-banner { left:366px; max-width:calc(100% - 456px); } }
@media(max-width:900px) {
  .home-city-banner { left:12px; bottom:calc(72px + env(safe-area-inset-bottom)); max-width:calc(100% - 86px); }
  [data-map-home]:has(.map-controls:not([hidden])) .home-city-banner { display:none; }
}

/* Give an open place popup/detail exclusive space over the city summary. */
[data-map-home] .map-stage:has(.maplibregl-popup, .map-detail-card:not([hidden])) .home-city-banner,
[data-map-home] .map-stage:has(.maplibregl-popup, .map-detail-card:not([hidden])) .home-activity-button,
[data-map-home] .map-stage:has(.maplibregl-popup, .map-detail-card:not([hidden])) .map-gesture-hint { display:none; }

/* The shared white header must win over legacy dark-nav account and hover styles. */
.site-header.map-home-header .button.nav-login,
.site-header.map-home-header .button.nav-login.is-account,
.site-header.map-home-header .button.nav-login:hover,
.site-header.map-home-header .button.nav-login:focus-visible {
  border-color:#002b5b;
  background:#002b5b;
  color:#fff;
  opacity:1;
  text-shadow:none;
}
.site-header.map-home-header .button.nav-login:focus-visible {
  outline:2px solid #0f766e;
  outline-offset:3px;
}
