body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: white;
  color: #333;
  line-height: 1.6;
  /* padding: 20px; */
  margin: 0;
}

#headerbar{
  background-image: url("../img/headerRepeat.png");
  overflow-x: hidden;
}
.legend-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.legend-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}
.legend-divider {
  display: none; /* モバイルでは非表示 */
}

.legend-section {
  flex: 1;
  min-width: 300px;
}

h2,
h3,
h4 {
  color: #2c3e50;
  margin-top: 20px;
}

h2 {
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

td:first-child {
  width: 50px;
  text-align: center;
}

img.symbol {
  max-width: 30px;
  max-height: 30px;
  display: block;
}


.pipe-info-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.pipe-type-heading,
.pipe-alphabet-heading {
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.pipe-list {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pipe-item {
  background-color: #f0f0f0;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  flex: 0 1 auto;
  min-width: calc(33.33% - 10px); /* 追加: 最小幅を設定 */
  max-width: calc(33.33% - 10px); /* 追加: 最大幅を設定 */
  
  box-sizing: border-box;
}

.pipe-code {
  font-weight: bold;
  color: #3498db;
}

@media (max-width: 768px) {
  .legend-content {
    flex-direction: column;
  }

  .legend-section {
    width: 100%;
  }

  td {
    padding: 5px;
  }

  td:first-child {
    width: 40px;
  }

  img.symbol {
    max-width: 25px;
    max-height: 25px;
  }

  .pipe-item {
    min-width: calc(50% - 10px); /* 変更: モバイル用の最小幅を設定 */
    max-width: calc(50% - 10px); /* 変更: モバイル用の最大幅を設定 */
  }
}

@media (min-width: 769px) {
  .legend-divider {
    display: block;
    /*position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;*/
    width: 5px;
    background-color: #e0e0e0;
    /*transform: translateX(-50%);*/
    margin: 0px 5px 0px 5px;

  }

  .pipe-type,
  .pipe-alphabet {
    flex: 1;
  }

  .pipe-item {
    min-width: calc(33.33% - 10px); /* 変更: デスクトップ用の最小幅を設定 */
    max-width: calc(33.33% - 10px); /* 変更: デスクトップ用の最大幅を設定 */
  }
}
