/* v2.9.19.2: The SAME interactive map powers both Map and Basic Information.
 * No SVG clones, no data re-computation, no alteration of the established map tab. */
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .v2919-basic-reference,
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .v29191-map-inset {display:none!important}

/* Desktop: both existing columns share one coherent canvas. Override the
 * v2.9.18.1 non-map full-width rules for Basic Information only. */
@media (min-width:901px) {
 body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] > .workspace {
   display:grid!important;
   grid-template-columns:minmax(0,1.35fr) minmax(330px,1fr)!important;
   align-items:start!important;
   gap:12px!important;
   height:auto!important;min-height:0!important;max-height:none!important;
   overflow:visible!important;
 }
 body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] > .workspace > .map-column {
   display:block!important;position:relative!important;grid-column:1!important;
   height:auto!important;min-height:0!important;max-height:none!important;
   width:100%!important;align-self:start!important;overflow:visible!important;
 }
 body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] > .workspace > .info-column {
   display:block!important;position:relative!important;grid-column:2!important;
   width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
   overflow:visible!important;align-self:start!important;
 }
}
/* Compact tablet/mobile: map remains large above its associated facts, no
 * cramped two-column viewport or tiny reference card. */
@media (max-width:900px) {
 body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] > .workspace {
   display:flex!important;flex-direction:column!important;gap:10px!important;
   height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;
 }
 body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] > .workspace > .map-column,
 body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] > .workspace > .info-column {
   display:block!important;position:relative!important;float:none!important;
   width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
   overflow:visible!important;align-self:stretch!important;
 }
}
/* Restrict map size overrides to Basic. The Map tab keeps its v2.9.6 sizing. */
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .map-column {
 padding:12px!important;background:#f9fcff!important;
 border:1px solid #dceaf4!important;border-radius:12px!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .map-column::before {
 content:'選択したまちの位置と周辺';display:block;font-size:12px;font-weight:750;
 color:#17476a;margin:0 0 8px;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .map-stage {
 display:block!important;width:100%!important;min-width:0!important;
 height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #map-view {
 display:flex!important;align-items:center!important;justify-content:center!important;
 width:100%!important;min-width:0!important;
 height:auto!important;min-height:340px!important;max-height:none!important;
 padding:0!important;margin:0!important;overflow:hidden!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #map-view svg {
 display:block!important;width:100%!important;max-width:100%!important;
 height:auto!important;max-height:none!important;object-fit:contain!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .metric-meta,
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #metric-context {
 font-size:11px!important;line-height:1.45!important;margin:0 0 6px!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .map-source {
 margin-top:8px!important;font-size:10px!important;line-height:1.45!important;
}
/* Counteract earlier wide detail layouts and make facts a compact companion. */
body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .info-column > .detail:not([hidden]) {
 display:block!important;width:100%!important;height:auto!important;min-height:0!important;
 max-height:none!important;overflow:visible!important;padding:14px!important;
}
body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .detail > .detail-head {
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:10px!important;margin:0 0 10px!important;padding:0 0 9px!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .detail-head h3 {
 font-size:clamp(20px,2.3vw,26px)!important;margin:2px 0!important;
}
body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .detail > .metric-grid {
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:7px!important;margin:0 0 9px!important;
}
body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .metric-grid > .metric-card {
 min-height:0!important;height:auto!important;margin:0!important;padding:10px 12px!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .metric-grid .main-metric .number {
 font-size:clamp(26px,3vw,37px)!important;line-height:1.22!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .metric-grid .mini-metric {
 display:flex!important;gap:5px 9px!important;flex-wrap:wrap!important;align-items:baseline!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .detail > .detail-section-control {margin:0 0 7px!important}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .detail-section-control select {height:35px!important;min-height:35px!important}
body #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #city-pane-overview:not([hidden]) {
 display:block!important;margin:0!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #city-pane-overview .insight-card {
 height:auto!important;min-height:0!important;padding:10px 11px!important;margin:0 0 7px!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #city-pane-overview .extra-stats {
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:7px!important;margin:0!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #city-pane-overview .extra-stat {
 min-width:0!important;min-height:0!important;margin:0!important;padding:10px!important;
}
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .detail > .active-metric-card,
#explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .detail > .detail-actions {
 margin-top:7px!important;padding:8px 10px!important;min-height:0!important;
}
/* Shared filters: equal-height controls without the orphan '54 cities' row. */
#explore .v2918-shell.v29192-ready .v2918-controls {align-items:end!important;gap:9px 12px!important}
#explore .v2918-shell.v29192-ready .v2918-controls .city-picker-count {
 grid-column:1/-1!important;grid-row:auto!important;margin:0!important;
 line-height:1!important;font-size:10px!important;
}
#explore .v2918-shell.v29192-ready .v2918-controls select {
 box-sizing:border-box!important;height:44px!important;min-height:44px!important;max-height:44px!important;
}
@media(min-width:1060px){
 #explore .v2918-shell.v29192-ready .v2918-controls {
   grid-template-columns:repeat(4,minmax(0,1fr))!important;
 }
}
@media(max-width:520px){
 #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #map-view{min-height:240px!important}
 #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] #city-pane-overview .extra-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #explore .v2918-shell.v29192-ready[data-v2918-view="basic"] .map-column{padding:9px!important}
}

/* v2.9.19.4: the hidden mobile summary cannot replace the primary fact card. */
@media(max-width:620px){
 body:has(#v290-mobile-home) #explore .v2918-shell .info-column .detail .main-metric {
  display:block!important;
 }
}
/* Keep the four native controls in two equal columns on compact screens. */
@media(max-width:1059px){
 #explore .v2918-shell.v29192-ready .v2918-controls {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
 #explore .v2918-shell.v29192-ready .v2918-controls .city-picker-control {
  grid-column:1!important;grid-row:1!important;
 }
 #explore .v2918-shell.v29192-ready .v2918-controls .year-picker-label {
  grid-column:2!important;grid-row:1!important;
 }
 #explore .v2918-shell.v29192-ready .v2918-controls .metric-picker>label:first-child {
  grid-column:1!important;grid-row:2!important;
 }
 #explore .v2918-shell.v29192-ready .v2918-controls .metric-picker>label:nth-child(2) {
  grid-column:2!important;grid-row:2!important;
 }
 #explore .v2918-shell.v29192-ready .v2918-controls .city-picker-count {
  grid-row:3!important;
 }
 #explore .v2918-shell.v29192-ready .v2918-controls #data-error:not([hidden]) {
  grid-row:4!important;
 }
}
