/* =============================
   City Data JP 都道府県ページ
   ============================= */

/* 統計カードグリッド */
.cdj-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .cdj-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cdj-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 統計カード */
.cdj-stat-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.cdj-stat-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.cdj-stat-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.cdj-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 6px;
    line-height: 1.2;
}

.cdj-stat-rank {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
}

.cdj-stat-rank strong {
    color: #f0a500;
    font-size: 15px;
}

.cdj-stat-year {
    font-size: 10px;
    color: #bbb;
}

.cdj-pref-summary {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin: 8px 0 20px;
    padding: 14px 16px;
    background: #f0f4f8;
    border-left: 4px solid #1a3a5c;
    border-radius: 0 6px 6px 0;
}

.cdj-related-links {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.cdj-related-links li a {
    display: block;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e0e8f0;
    border-radius: 4px;
    color: #1a5276;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.cdj-related-links li a:hover {
    background: #e8f0f8;
    color: #f0a500;
}

/* ── 指標推移グラフ ────────────────────────────── */
.cdj-trend-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cdj-trend-row {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.cdj-trend-row:last-child {
    border-bottom: none;
}

.cdj-trend-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.cdj-trend-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.cdj-trend-latest {
    font-size: 12px;
    color: #6b7280;
}

.cdj-trend-chart {
    width: 100%;
    height: 110px;
}

@media (max-width: 600px) {
    .cdj-trend-chart {
        height: 90px;
    }
}

/* ── 年収ランキング タブ ─────────────────────── */
.cdj-income-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin: 16px 0;
    flex-wrap: wrap;
}
.cdj-income-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.cdj-income-tab:hover {
    color: #3b82f6;
}
.cdj-income-tab--active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

/* ── カーブに追加ボタン ───────────────────────── */
.cdj-curve-btn {
    padding: 3px 8px;
    font-size: 12px;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    color: #3b82f6;
    background: #fff;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.cdj-curve-btn--added {
    background: #3b82f6;
    color: #fff;
}

/* ── 年収カーブセクション ────────────────────── */
.cdj-curve-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}
.cdj-curve-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}
.cdj-curve-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
}
.cdj-curve-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    min-height: 28px;
}
.cdj-curve-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.cdj-curve-chip-remove {
    cursor: pointer;
    opacity: .7;
    font-size: 11px;
}
.cdj-curve-chip-remove:hover {
    opacity: 1;
}
