/* ========================================
   サイズチャート全体を明朝体に統一
   ======================================== */

.measurement-info,
.measurement-chart,
.chart-header h4,
.chart-hint,
.size-table,
.size-table thead,
.size-table th,
.size-table td,
.waist-label,
.waist-value,
.header-empty,
.header-height,
.header-divider,
.header-height-item,
.size-available,
.size-unavailable {
  font-family: 'Playfair Display', serif;
}



/* ========================================
   サイズセクション
   ======================================== */

.size-section {
  margin: 30px 150px;
  padding: 50px 50px;
  border-radius: 15px;
  background-color: #f8f8f8;
}

.size-title {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 16px;
  color: #333;
}

.size-description {
  font-size: 14px;
  text-align: center;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.8;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.size-caption {
  background-color: #f1edf9;
  font-size: 14px;
  text-align: left;
  color: #666;
  margin-top: 40px;
  margin-bottom: 40px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  max-width: 800px;
  border-left: 5px solid #d4d0db;
  padding: 1.5rem;
  border-radius: 4px;
}

/* ========================================
   ボディサイズ範囲セクション
   ======================================== */

.measurement-info {
  margin-bottom: 3rem;
}

.measurement-info-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.measurement-chart {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chart-header {
  text-align: center;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #e8e8e8;
}

.chart-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #2c2c2c;
  margin: 0 0 0.4rem 0;
}

.chart-hint {
  font-size: 0.8rem;
  color: #888;
  display: block;
}

.size-chart-wrapper {
  overflow-y: auto;
  overflow-x: auto;
  max-height: 400px;
  width: 100%;
  border-radius: 6px;
  scroll-behavior: smooth;
  position: relative;
  border: 1px solid #e8e8e8;
  -webkit-overflow-scrolling: touch;
}

.size-chart-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.size-chart-wrapper::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 8px;
}

.size-chart-wrapper::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 8px;
}

.size-chart-wrapper::-webkit-scrollbar-thumb:hover {
  background: #666;
}

.size-chart {
  display: block;
  width: 100%;
  margin: 0 auto;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.size-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.size-table th {
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.header-empty {
  background-color: #e3dfeb;
  color: #2c2c2c;
  border: 1px solid #d4d0db;
}

.header-height {
  background-color: #e3dfeb;
  color: #2c2c2c;
  border-right: 1px solid #d4d0db;
}

.header-divider {
  background-color: #e8e8e8;
  color: #2c2c2c;
  border-right: 1px solid #ddd;
}

.header-height-item {
  background-color: #e8e8e8;
  color: #2c2c2c;
  border-right: 1px solid #ddd;
}

.size-table td {
  padding: 0.8rem;
  text-align: center;
  border: 1px solid #e8e8e8;
  font-size: 0.9rem;
}

.waist-label {
  background-color: #e3dfeb;
  color: #2c2c2c;
  font-weight: 600;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 1rem 0.5rem;
  border: 1px solid #d4d0db;
  position: sticky;
  left: 0;
  z-index: 5;
}

.waist-value {
  background-color: #f5f5f5;
  font-weight: 500;
  color: #2c2c2c;
  border: 1px solid #e8e8e8;
  min-width: 50px;
  position: sticky;
  left: 40px;
  z-index: 4;
}

.size-available {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  color: white;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid #000;
  transition: all 0.3s ease;
  cursor: pointer;
}

.size-available:hover {
  background: linear-gradient(135deg, #d4af37 0%, #c99e2a 100%);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transform: scale(1.05);
}

.size-unavailable {
  background: white;
  color: #ddd;
  border: 1px solid #e8e8e8;
}

/* ========================================
   レスポンシブデザイン（タブレット）
   ======================================== */

@media (max-width: 768px) {
  .size-section {
    margin: 30px 60px;
    padding: 40px 30px;
  }

  .size-title {
    font-size: 16px;
  }

  .size-description {
    font-size: 13px;
    margin-bottom: 30px;
  }

  .size-caption {
    font-size: 13px;
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 1.2rem;
  }

  .chart-header h4 {
    font-size: 0.95rem;
  }

  .size-table th,
  .size-table td {
    padding: 0.7rem;
    font-size: 0.85rem;
  }

  .size-chart-wrapper {
    max-height: 350px;
  }
}

/* ========================================
   レスポンシブデザイン（スマートフォン）
   ======================================== */

@media (max-width: 480px) {
  .size-section {
    margin: 15px -15px;
    padding: 20px 10px;
  
  }

  .size-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .size-description {
    font-size: 12px;
    margin-bottom: 20px;
    line-height: 1.6;
  }

  .measurement-info-wrapper {
    width: 100%;
    padding: 0;
  }

  .measurement-chart {
    width: calc(100% + 30px);
    margin-left: -15px;
    padding: 10px 15px;
  }

  .chart-header {
    padding-bottom: 0.6rem;
  }

  .chart-header h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
  }

    .size-chart-wrapper {
    max-height: 200px;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .size-table {
    width: 100%;
    min-width: 280px;
  }

  .size-table th,
  .size-table td {
    padding: 0.4rem 0.3rem;
    font-size: 0.65rem;
    white-space: nowrap;
    border: 0.5px solid #e8e8e8;
  }

  .waist-label {
    padding: 0.4rem 0.2rem;
    font-size: 0.6rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
  }

  .waist-value {
    padding: 0.3rem;
    font-size: 0.65rem;
    min-width: 30px;
  }

  .size-available,
  .size-unavailable {
    padding: 0.3rem 0.2rem;
    font-size: 0.6rem;
  }

  .carousel-prev,
  .carousel-next {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    margin: 0.3rem 0;
  }

  .chart-header {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e8e8e8;
  }

  .chart-header h4 {
    font-size: 0.8rem;
    margin: 0 0 0.3rem 0;
  }

  .chart-hint {
    font-size: 0.65rem;
  }
}
