/* ================================================================
   map.css — /map/ と /land-price/ 共通スタイル
   ================================================================ */

/* ── 共通 ── */
.cdj-map-page {
    background: #f8fafc;
    min-height: 100vh;
    padding-bottom: 60px;
}

.cdj-map-page h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 24px 0 4px;
}

.cdj-source {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.cdj-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 32px 0 8px;
}

/* ── /map/ カテゴリタブ ── */
.cdj-map-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 12px;
}

.cdj-map-tab {
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    background: #fff;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.cdj-map-tab:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.cdj-map-tab--active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* ── サブ指標ボタン ── */
.cdj-map-subkeys {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.cdj-map-subkeys--active {
    display: flex;
}

.cdj-map-subkey {
    padding: 5px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: #64748b;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
}

.cdj-map-subkey:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.cdj-map-subkey--active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* ── ランキングテーブル ── */
.cdj-map-note {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 6px 0 16px;
}

.cdj-map-ranking-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 24px 0 12px;
}

.cdj-ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

.cdj-ranking-table th,
.cdj-ranking-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.cdj-ranking-table thead th {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    font-size: 0.8rem;
}

.cdj-ranking-table tbody tr:hover {
    background: #f8fafc;
}

.cdj-ranking-table .col-rank {
    width: 56px;
    text-align: center;
    color: #94a3b8;
    font-weight: 700;
}

.cdj-ranking-table .col-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #1e293b;
    font-weight: 600;
}

.cdj-ranking-table .col-name a {
    color: #3b82f6;
    text-decoration: none;
}

.cdj-ranking-table .col-name a:hover {
    text-decoration: underline;
}

/* ── /land-price/ コントロール ── */
.cdj-lp-controls {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.cdj-lp-control-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cdj-lp-control-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.cdj-lp-control-row select {
    padding: 7px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
}

.cdj-lp-control-row select:focus {
    outline: none;
    border-color: #3b82f6;
}

.cdj-btn-primary {
    padding: 8px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-left: auto;
}

.cdj-btn-primary:hover {
    background: #2563eb;
}

.cdj-lp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #475569;
}

.cdj-lp-stats strong {
    color: #1e293b;
}

/* ── 凡例 ── */
.cdj-lp-legend {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.cdj-lp-legend-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #64748b;
}

.cdj-lp-legend-gradient {
    width: 180px;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(to right, rgb(30,120,255), rgb(245,94,68));
}

.cdj-lp-legend-label {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ── 推移グラフ下余白 ── */
.cdj-lp-trend-note {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0 0 8px;
}

/* ── セットアップ案内 ── */
.cdj-setup-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
}

.cdj-setup-notice h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
}

.cdj-setup-notice p {
    font-size: 0.9rem;
    color: #78350f;
    margin-bottom: 12px;
}

.cdj-setup-notice ol {
    padding-left: 20px;
    color: #78350f;
    font-size: 0.9rem;
}

.cdj-setup-notice li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.cdj-setup-notice pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.82rem;
    overflow-x: auto;
    margin-top: 6px;
}


/* ── レスポンシブ ── */
@media (max-width: 640px) {
    .cdj-map-tabs {
        gap: 6px;
    }

    .cdj-map-tab {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .cdj-lp-control-row {
        gap: 8px;
    }

    .cdj-lp-control-row select {
        min-width: 90px;
        font-size: 0.82rem;
    }

    .cdj-btn-primary {
        margin-left: 0;
        width: 100%;
    }

    .cdj-ranking-table th,
    .cdj-ranking-table td {
        padding: 8px 10px;
        font-size: 0.83rem;
    }
}

/* ── 市区町村選択バー ── */
.cdj-lp-city-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #1e40af;
}

.cdj-btn-secondary {
    padding: 5px 14px;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s;
}
.cdj-btn-secondary:hover { background: #f3f4f6; }

/* ── パンくずナビ ── */
.cdj-breadcrumb {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 12px;
}
.cdj-breadcrumb a { color: #3b82f6; text-decoration: none; }
.cdj-breadcrumb a:hover { text-decoration: underline; }

/* ── 定型文サマリー ── */
.cdj-lp-summary-text {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 32px;
    line-height: 1.8;
}
.cdj-lp-summary-text p { margin: 0 0 8px; }
.cdj-lp-summary-text p:last-child { margin-bottom: 0; }

/* =============================
   不動産投資ナビ 追加スタイル
   ============================= */

/* エリア絞り込みサーチツール */
.cdj-lp-search-tool {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 20px 0 28px;
}
.cdj-lp-search-tool h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px;
}
.cdj-lp-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}
.cdj-lp-search-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cdj-lp-search-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}
.cdj-lp-search-field select,
.cdj-lp-search-field input[type="number"] {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    min-width: 120px;
}
.cdj-lp-search-results {
    margin-top: 16px;
}
.cdj-lp-search-empty {
    color: #94a3b8;
    font-size: 0.88rem;
    padding: 12px 0;
    text-align: center;
}

/* 全国都道府県ランキング（タブ） */
.cdj-lp-national {
    margin: 28px 0;
}
.cdj-lp-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 12px;
}
.cdj-lp-tab {
    padding: 7px 18px;
    font-size: 0.83rem;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: color 0.15s, border-color 0.15s;
}
.cdj-lp-tab:hover { color: #1e293b; }
.cdj-lp-tab.is-active {
    color: #1a3a5c;
    border-bottom-color: #f0a500;
    background: #fff;
}
.cdj-lp-tab-panel { display: none; }
.cdj-lp-tab-panel.is-active { display: block; }

/* 注目エリアカード */
.cdj-lp-feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0 28px;
}
.cdj-lp-feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
}
.cdj-lp-feature-card h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.cdj-lp-feature-card ol {
    margin: 0;
    padding-left: 18px;
    font-size: 0.85rem;
}
.cdj-lp-feature-card li {
    margin-bottom: 5px;
    line-height: 1.5;
}
.cdj-lp-feature-card li a {
    color: #1a3a5c;
    text-decoration: none;
    font-weight: 600;
}
.cdj-lp-feature-card li a:hover { text-decoration: underline; }
.cdj-lp-feature-yoy {
    color: #16a34a;
    font-size: 0.78rem;
    margin-left: 4px;
}
.cdj-lp-feature-yoy.down { color: #dc2626; }

/* 投資サマリーカード（市区町村ページ） */
.cdj-invest-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 0 24px;
}
.cdj-invest-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
}
.cdj-invest-card-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
}
.cdj-invest-card-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.cdj-invest-card-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 3px;
}
.cdj-invest-card-value.up   { color: #16a34a; }
.cdj-invest-card-value.down { color: #dc2626; }
.cdj-hazard-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.cdj-hazard-badge.low  { background: #dcfce7; color: #15803d; }
.cdj-hazard-badge.mid  { background: #fef9c3; color: #a16207; }
.cdj-hazard-badge.high { background: #fee2e2; color: #b91c1c; }

/* SEO解説テキスト */
.cdj-lp-seo-text {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 32px 0;
}
.cdj-lp-seo-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}
.cdj-lp-seo-text p {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.75;
    margin: 0 0 12px;
}
.cdj-lp-seo-text p:last-child { margin-bottom: 0; }

/* レスポンシブ */
@media (max-width: 640px) {
    .cdj-lp-feature-cards { grid-template-columns: 1fr; }
    .cdj-invest-cards      { grid-template-columns: repeat(2, 1fr); }
    .cdj-lp-search-row     { flex-direction: column; }
}
