#modelForm details summary {
    cursor: pointer;
    padding: 6px 4px;
    font-weight: 600;
    color: #2c3e50;
    user-select: none;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 4px;
}

#modelForm details label {
    display: block;
    padding: 3px 0 3px 12px;
    font-weight: normal;
}

@media (min-width: 768px) {
    #modelForm {
        column-count: 2;
        column-gap: 20px;
    }

    #modelForm details,
    #modelForm > label {
        break-inside: avoid;
    }
}

.filter-container {
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: "Noto Sans JP", sans-serif;
}

.filter-container label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-container input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9fcff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.filter-container input[type="date"]:focus {
    outline: none;
    border-color: #4a90e2;
}

.filter-container button {
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-container button:hover {
    background-color: #357ab8;
}

.date-range-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f0f4ff;  /* 薄い青で強調 */
    border-radius: 8px;
}

.date-range-group label {
    font-weight: bold;
    color: #333;
    margin-right: 6px;
}

.date-range-group select,
.date-range-group button {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 6px;
}

.date-range-group span {
    font-weight: bold;
    margin: 0 6px;
}

/* 年月の単位表示 */
.unit-label {
    margin-right: 8px;
    font-size: 14px;
    color: #555;
}

/* 年月セレクトボックスをまとめる */
.date-select-block {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* セレクトが注目されやすいように枠や背景強調 */
.select-highlight {
    background-color: #f9fcff;
    border: 1px solid #bbb;
    padding: 6px;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.select-highlight:hover,
.select-highlight:focus {
    border-color: #4a90e2;
}

/* ラベル補足説明 */
.note {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

/* 事業者規模チェックボックスグループ */
.scale-checkboxes-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.scale-checkboxes-wrapper > label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    padding-top: 2px;
}

.scale-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scale-checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f0f4ff;
    border: 1px solid #c8d4f0;
    transition: background-color 0.2s;
}

.scale-checkbox-label:hover {
    background-color: #dce8ff;
}

.scale-checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

/* 指標比較トグルグループ */
.comparison-indicator-toggles {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

/* 前年比トグル */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    background-color: #f0f4ff;
    border: 1px solid #c8d4f0;
    transition: background-color 0.2s;
}

.toggle-label:hover {
    background-color: #dce8ff;
}

.toggle-label input[type="checkbox"] {
    cursor: pointer;
}

/* 列幅の設定 */
.quarter-col { width: 10%; }
.survey-col { width: 15%; }
.industry-col { width: 20%; }
.scale-col { width: 15%; }
.unit-col { width: 10%; text-align: right;}

/* テーブル内のセルスタイル */
.date-cell { font-weight: 500; }
.quarter-cell { color: #2c3e50; font-weight: 500; }
.survey-cell { color: #1976d2; font-weight: 500; }
.industry-cell { color: #2c3e50; font-weight: 500; }
.scale-cell { color: #1976d2; font-weight: 500; }
.unit-cell { font-size: 12px; color: #888; }

/* 関連指標リンク */

@media screen and (max-width: 768px) {

  .filter-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1em;
  }

  .date-range-group {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .select-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .select-wrapper label {
    margin-top: 8px;
  }

  .select-wrapper select {
    width: 100%;
  }

  .compact-table th,

  /* モバイルでは列幅を調整 */
    .date-col { width: 15%; }
    .model-col { width: 10%; }
    .mode-col { width: 10%; }
    .format-col { width: 10%; }
    .fuel-col { width: 15%; }
    .unit-col { width: 25%; }
}
