
.content {
    padding: 30px;
    background-color: #fafafa;
    min-height: calc(100vh - 200px);
}

/* 指標説明セクション */
.indicator-explanation {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.indicator-title {
    color: #2c3e50;
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.explanation-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 25px;
}

.explanation-summary p {
    color: #555;
    font-size: 1.1em;
    line-height: 1.7;
    margin: 0;
}

.explanation-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.detail-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: #e3f2fd;
    border-color: #3498db;
    transform: translateY(-2px);
}

.detail-item h3 {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.detail-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* チャートセクション */
.chart-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}



.chart-container {
    width: 100%;
    height: 700px;
    max-height: 1000px;
}

.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;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-width: 400px;
    width: 75%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

#industryclassForm {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px 16px; /* 行間・列間 */
}



.close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
}

.confirm {
    margin-top: 20px;
    width: 100%;
}

.scroll-container {
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 8px; /* スクロールバーとテキストの重なり防止 */
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.secondary {
    background-color: #e5e7eb;
    color: #111827;
    border: none;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.secondary:hover {
    background-color: #d1d5db;
}

.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;
}

/* データ活用ガイド */
.usage-guide {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.usage-guide h2 {
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.guide-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.guide-item:hover {
    background: #e3f2fd;
    border-color: #3498db;
    transform: translateY(-2px);
}

.guide-item h3 {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.guide-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 関連指標リンク */
.related-indicators {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-indicators h2 {
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.indicator-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.indicator-link {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.indicator-link:hover {
    background: #e3f2fd;
    border-color: #3498db;
    transform: translateY(-2px);
}

.link-title {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.link-desc {
    display: block;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.notation {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-top: 20px;
}

.notation p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.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;
}

/* 年月セレクトボックスをまとめる */
.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;
}

/* テーブルセクション */
.table-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-section h2 {
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.table-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.compact-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #333;
    min-width: 150px;
    transition: border-color 0.2s;
}

.compact-select:focus {
    outline: none;
    border-color: #3498db;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 13px;
}

.compact-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    font-weight: 600;
    color: #495057;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.compact-table td {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

.compact-table tbody tr:hover {
    background-color: #f8f9fa;
}

.compact-table tbody tr.hidden {
    display: none;
}

.year-col, .year-cell {
    width: 15%;
    min-width: 80px;
}

.sector-col, .sector-cell {
    width: 20%;
    min-width: 100px;
}

.category-col, .category-cell {
    width: 25%;
    min-width: 120px;
}

.value-col, .value-cell {
    width: 15%;
    min-width: 80px;
    text-align: right;
}

.rate-col, .rate-cell {
    width: 15%;
    min-width: 80px;
    text-align: right;
}

.date-col, .date-cell {
    width: 20%;
    min-width: 100px;
}

.year-cell, .date-cell {
    font-weight: 500;
    color: #495057;
}

.sector-cell, .category-cell {
    color: #333;
    font-size: 12px;
    font-weight: 500;
}

.value-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #2c3e50;
}

.rate-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.value , .rate{
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    min-width: 40px;
}

.value-na, .rate_na {
    color: #6c757d;
    font-style: italic;
}

@media screen and (max-width: 768px) {
    .content {
        padding: 15px;
    }

    .indicator-explanation,
    .chart-section,
    .usage-guide,
    .related-indicators {
        padding: 20px;
        margin-bottom: 20px;
    }

    .indicator-title {
        font-size: 1.4em;
    }

    .explanation-details,
    .guide-grid,
    .indicator-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }

  .filter-container {
    flex-direction: column;
      align-items: center;
    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%;
  }

    .chart-container {
        height: 60vh;
    }
}

@media screen and (max-width: 480px) {
    .content {
        padding: 10px;
    }

    .indicator-explanation,
    .usage-guide,
    .chart-section,
    .related-indicators {
        padding: 15px;
    }

    .indicator-title {
        font-size: 1.2em;
    }

    .explanation-summary {
        padding: 15px;
    }

    .detail-item,
    .guide-item {
        padding: 15px;
  }

    .chart-container {
        height: 50vh;
  }
}
