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

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

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

/* フィルターコンテナ */
.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 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;
}

/* エリアペア */
.area-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f0f4ff;
    border-radius: 8px;
    flex-wrap: wrap;
}

.area-pair label {
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

/* 期間フィルター */
.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 {
    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;
}

.note {
    font-size: 12px;
    color: #888;
    margin-left: 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;
}

/* モーダル */
.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;
}

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

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

/* カテゴリグループ（vital_statistics_survey.cssのスタイルを流用） */
#categoryForm {
    display: block;
}

.category-group-block {
    padding: 4px 0 12px;
    margin-bottom: 8px;
}

.category-group-title {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 30px;
    margin: 12px -30px 10px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.category-group-block:first-child .category-group-title {
    margin-top: 0;
    border-top: none;
}

.category-group-title.count-title {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.category-group-title.rate-title {
    background-color: #f0fdf4;
    color: #166534;
}

.category-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px 16px;
    padding: 4px 0;
}

.category-group-items label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background-color: #4f46e5;
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: #4338ca;
}

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

/* 選択中カテゴリ表示 */
.selected-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.category-badge.count-badge {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.category-badge.rate-badge {
    background-color: #dcfce7;
    color: #166534;
}

/* データソース・免責 */
.notation {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-top: 20px;
}

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

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

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

    .area-pair,
    .date-range-group {
        flex-wrap: wrap;
        width: 100%;
    }

    .select-highlight {
        width: 100%;
    }

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

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