@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, 'Noto Sans JP', sans-serif;
    font-size: 17px;
    line-height: 1.47058823;
    color: #1d1d1f;
    background-color: #f5f5f7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    background-color: #ffffff;
    padding: 44px 0 32px;
    text-align: center;
    border-bottom: 1px solid #d2d2d7;
}

header h1 {
    font-size: 48px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.003em;
    line-height: 1.0833333333;
    margin: 0;
}

main {
    max-width: 980px;
    margin: 0 auto;
    padding: 50px 22px;
}

.intro {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 18px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.intro p {
    font-size: 19px;
    line-height: 1.4210526316;
    color: #1d1d1f;
    margin-bottom: 16px;
    font-weight: 400;
}

.intro p:last-child {
    margin-bottom: 0;
}

.update-info {
    text-align: right;
    margin-top: 20px;
}

.update-info p {
    font-size: 14px !important;
    color: #86868b !important;
    font-weight: 400 !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
}

.update-info p:last-child {
    margin-bottom: 0 !important;
}

.map-container {
    background-color: #fafafa;
    padding: 60px 40px;
    border-radius: 18px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    gap: 30px;
}

.map-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-container svg {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    width: auto;
    display: block;
}

/* SVG内の都道府県のデフォルトスタイル */
.map-container svg path,
.map-container svg polygon,
.map-container svg circle {
    fill: #ffffff !important;
    stroke: #8e8e93 !important;
    stroke-width: 0.8 !important;
    transition: fill 0.3s ease;
}

/* デフォルトのrectスタイル（色分けクラスがない場合） */
.map-container svg rect {
    fill: #ffffff !important;
    stroke: #8e8e93 !important;
    stroke-width: 0.8 !important;
    rx: 3 !important;
    ry: 3 !important;
    transition: fill 0.3s ease;
    fill-opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 価格に応じた色分け - 都道府県別 */
/* 高額の都道府県（赤系） */
.map-container svg g.high-price rect {
    fill: #ffebee !important;
    fill-opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 低額の都道府県（青系） */
.map-container svg g.low-price rect {
    fill: #e3f2fd !important;
    fill-opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 平均価格の都道府県（白） */
.map-container svg g.average-price rect {
    fill: #ffffff !important;
    fill-opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.map-container svg text {
    fill: #1d1d1f !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, 'Noto Sans JP', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.national-average {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px 32px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    text-align: center;
    border: 1px solid #e5e5e7;
}

.average-label {
    font-size: 15px;
    font-weight: 500;
    color: #86868b;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.average-price {
    font-size: 36px;
    font-weight: 700;
    color: #007aff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.currency {
    font-size: 20px;
    font-weight: 500;
    color: #86868b;
    margin-left: 4px;
}

.source {
    text-align: center;
    font-size: 17px;
    color: #86868b;
    margin-top: 24px;
    font-weight: 400;
}

a {
    color: #007aff;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

a:visited {
    color: #007aff;
}

footer {
    background-color: #f5f5f7;
    padding: 40px 0;
    border-top: 1px solid #d2d2d7;
    margin-top: 60px;
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content a {
    color: #86868b;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3333;
}

.footer-content a:hover {
    color: #1d1d1f;
}

@media (max-width: 834px) {
    header {
        padding: 32px 0 24px;
    }
    
    header h1 {
        font-size: 40px;
        line-height: 1.1;
    }
    
    main {
        padding: 40px 22px;
    }
    
    .intro {
        padding: 32px;
        margin-bottom: 32px;
    }
    
    .map-container {
        padding: 40px 20px;
        margin-bottom: 32px;
        min-height: 400px;
    }
    
    .intro p {
        font-size: 17px;
        line-height: 1.47058823;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

@media (max-width: 430px) {
    header h1 {
        font-size: 32px;
        line-height: 1.125;
    }
    
    main {
        padding: 32px 16px;
    }
    
    .intro {
        padding: 24px;
        margin-bottom: 24px;
        border-radius: 16px;
    }
    
    .map-container {
        padding: 30px 16px;
        margin-bottom: 24px;
        border-radius: 16px;
        min-height: 350px;
    }
}