html,
body{

  height:100%;
  margin:0;

  font-family:
    "Yu Gothic",
    "Meiryo",
    sans-serif;

}

*{

  box-sizing:border-box;

}

:root{

  --gsi-blue:#0078d4;

  --border:#d9d9d9;

  --sidebar:#f7f7f7;

  --danger:#d32f2f;

  --gray:#555555;

}

/* ==================================
   Header
================================== */

header{

  height:90px;

  display:flex;

  align-items:center;

  gap:16px;

  padding:0 16px;

  background:#ffffff;

  border-bottom:
    4px solid var(--gsi-blue);

}

header h1{

  margin:0;

  flex:1;

  font-size:30px;

  line-height:1.3;

}

.gsi-logo{

  height:60px;

  width:auto;

  display:block;

}

#menuToggle{

  width:auto;

  min-width:100px;

  height:40px;

  padding:0 12px;

  border:1px solid #cfcfcf;

  border-radius:6px;

  background:#0078d4;

  color:#ffffff;

  cursor:pointer;

  font-size:16px;

  font-weight:700;

  transition:.15s;

}

#menuToggle:hover{

  background:#005fa8;

}

/* ==================================
   Layout
================================== */

.container{

  display:flex;

  height:calc(100vh - 94px);

}

#sidebar{

  width:420px;

  background:var(--sidebar);

  border-right:
    1px solid var(--border);

  padding:20px;

  overflow-y:auto;

  transition:.25s;

}

#sidebar.collapsed{

  width:0;

  padding:0;

  overflow:hidden;

  border-right:none;

}

#map{

  flex:1;

}

/* ==================================
   Sidebar
================================== */

.sidebar-title{

  margin-top:0;

}

.map-section{

  margin-bottom:36px;

  padding-bottom:24px;

  border-bottom:
    1px solid var(--border);

}

.map-select{

  display:block;

  font-size:18px;

  font-weight:700;

}

.desc{

  margin-top:10px;

  font-size:14px;

  line-height:1.9;

  color:#333;

}

.desc a,
.sidebar-footer a{

  color:var(--gsi-blue);

  text-decoration:none;

  font-weight:600;

}

.desc-list{

  margin:8px 0 0 0;

  padding-left:1.2em;

}

.desc-list li{

  margin-bottom:4px;

}

.desc a:hover,
.sidebar-footer a:hover{

  text-decoration:underline;

}

.legend-item{

  margin-top:10px;

  font-size:14px;

}

.legend-red{

  color:var(--danger);

}

.legend-gray{

  color:var(--gray);

}

.sidebar-footer{

  margin-top:30px;

}

/* ==================================
   Popup
================================== */

.leaflet-popup-content{

  min-width:340px;

  max-width:400px;

  margin:10px;

}

.popup-wrapper{

  max-height:350px;

  overflow-y:auto;

  -webkit-overflow-scrolling:touch;

}

.popup-title{

  font-size:22px;

  font-weight:700;

  line-height:1.3;

  border-left:
    4px solid var(--gsi-blue);

  padding-left:8px;

}

.popup-yomi{

  color:#666;

  margin-top:2px;

  margin-bottom:6px;

}

.popup-section-title{

  margin-top:12px;

  padding:6px 8px;

  background:#f5f5f5;

  border:1px solid
    var(--border);

  font-weight:700;

}

.popup-table{

  width:100%;

  border-collapse:collapse;

}

.popup-table th{

  width:40%;

  background:#fafafa;

  text-align:left;

  font-weight:600;

}

.popup-table th,
.popup-table td{

  border:1px solid
    var(--border);

  padding:4px 6px;

  font-size:12px;

  line-height:1.5;

  vertical-align:top;

}

.popup-table td{

  white-space:normal;

}

.popup-table a{

  color:var(--gsi-blue);

  text-decoration:none;

  font-weight:600;

}

.popup-table a:hover{
  text-decoration:underline;
}

.popup-remarks{

  padding:8px;

  border:1px solid
    var(--border);

  background:#fafafa;

  line-height:1.6;

  white-space:normal;

}

/* ==================================
   Download Cards
================================== */

.download-grid{

  display:grid;

  grid-template-columns:
    1fr 1fr;

  gap:6px;

  margin-top:6px;

}

.download-item{

  border:1px solid
    var(--border);

  border-radius:4px;

  padding:6px;

  background:#ffffff;

  box-shadow:
    0 1px 2px
    rgba(0,0,0,0.08);

  min-height:90px;
 
}

.download-label{

  font-size:11px;

  font-weight:700;

  margin-bottom:4px;

}

.download-item a{

  display:block;

  text-align:center;

  padding:6px 10px;

  background:#0078d4;

  color:#ffffff;

  border-radius:4px;

  text-decoration:none;

  font-size:12px;

  font-weight:600;

}

.download-item a:hover{

  background:#005fa8;

}

.download-size-inline{

  display:block;

  margin-top:4px;

  color:#ffffff;

  font-size:10px;

  font-weight:400;

}

/* ==================================
   No Download
================================== */

.no-download{

  margin-top:10px;

  padding:10px;

  border:1px solid
    var(--border);

  background:#fafafa;

  font-size:13px;

}

/* ==================================
   Loading
================================== */

#loading{

  display:none;

  position:absolute;

  top:100px;

  right:20px;

  background:#ffffff;

  border:1px solid
    var(--border);

  padding:8px 12px;

  z-index:999;

}

/* ==================================
   Tablet
================================== */

@media (max-width:768px){

  #sidebar{

    width:300px;

  }

  header h1{

    font-size:22px;

  }

  .popup-title{

    font-size:18px;

  }

}

/* ==================================
   Mobile
================================== */

@media (max-width:480px){

  .popup-wrapper{

    max-height:250px;

  }

  header{

    gap:10px;

    padding:0 8px;

  }

  header h1{

    font-size:18px;

  }

  .gsi-logo{

    height:45px;

  }

  #menuToggle{

    width:auto;

    min-width:80px;

    height:36px;

    padding:0 8px;

    font-size:14px;

  }

  #sidebar{

    width:260px;

    padding:12px;

  }

  .map-select{

    font-size:16px;

  }

  .desc{

    font-size:13px;

    line-height:1.7;

  }

  .legend-item{

    font-size:13px;

  }

  .leaflet-popup-content{

    min-width:260px;

    max-width:260px;

    margin:8px;

  }

  .popup-title{

    font-size:16px;

  }

  .popup-yomi{

    font-size:12px;

  }

  .popup-table th,
  .popup-table td{

    font-size:11px;

    padding:3px 4px;

  }

  .download-grid{

    grid-template-columns:1fr;

  }

  .download-item a{

    display:block;

    width:100%;

    text-align:center;

  }
 
}

/* ==================================
   Small Mobile
================================== */

@media (max-width:360px){

  header h1{

    font-size:16px;

  }

  #sidebar{

    width:240px;

  }

  .leaflet-popup-content{

    min-width:220px;

    max-width:220px;

  }

}