#map_area { margin-bottom: 20px; }

#map_canvas {
    position: relative !important;
    width: 100%;
    height: 500px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.castle-map-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.castle-map-marker-icon {
    display: block;
    width: 36px;
    height: 36px;
}

.castle-map-marker-label {
    margin-top: 2px;
    padding: 1px 6px;
    max-width: 120px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: 3px;
    background: rgba(42, 20, 20, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.map-unavailable {
    padding: 16px;
    background: var(--mist);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--muted-maroon);
}

#map_search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
#map_search input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
}
#map_search button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
#map_search button:hover { background: var(--brand-grad-end); }

.custom-callout {
    position: absolute;
    background: #fff;
    padding: 16px;
    border-radius: 16px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    display: none;
    z-index: 999;
    transform: translate(-50%, -100%);
    width: 240px;
}

.callout-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--mist);
    font-size: 15px;
    line-height: 1;
    font-weight: bold;
    cursor: pointer;
    color: var(--muted-maroon);
}
.callout-close:hover { background: var(--border); color: var(--maroon); }

.mobile-callout { background-color: rgba(255, 255, 255, 0.97); }

.callout-title {
    font-weight: 700;
    font-size: 15px;
    padding-right: 24px;
    margin-bottom: 4px;
    color: var(--maroon);
}

.callout-address {
    font-size: 12px;
    color: var(--muted-maroon);
    margin-bottom: 4px;
    line-height: 1.5;
}

.callout-facts {
    font-size: 12px;
    color: var(--ink);
    margin-bottom: 12px;
    line-height: 1.5;
}

.callout-actions { display: flex; flex-direction: column; gap: 8px; }
.callout-btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    box-sizing: border-box;
}
.callout-btn--site { background: var(--brand); color: #fff; }
.callout-btn--site:hover { background: var(--brand-grad-end); color: #fff; text-decoration: none; }

.map-area-search-heading {
    margin: 24px 0 8px;
    font-family: 'Noto Serif JP', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--maroon);
}

/* PC: エリア名＋都道府県リンクを横並びの行で表示する（折り畳みなし） */
.map-area-search {
    display: flex;
    flex-direction: column;
}

.map-area-search .accordion {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.map-area-search dt {
    flex-shrink: 0;
    width: 130px;
    margin: 0;
    color: var(--maroon);
    font-size: 14px;
    font-weight: 700;
    cursor: default;
}

.map-area-search dt::after { display: none; }

.map-area-search dd {
    flex: 1;
    min-width: 200px;
    margin: 0;
    display: block;
    max-height: none;
    overflow: visible;
}

.map-area-search dd ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.map-area-search dd li a {
    display: inline-block;
    padding: 2px 0;
    font-size: 13px;
    color: var(--link);
}

.map-area-search dd li a:hover { text-decoration: underline; }

.map-area-search dd li + li::before {
    content: '｜';
    margin: 0 8px;
    color: var(--border);
}

/* モバイル: エリアごとにカード化し、都道府県リストは折り畳んで表示する */
@media screen and (max-width: 768px) {
    .map-area-search { display: flex; flex-direction: column; gap: 8px; }

    .map-area-search .accordion {
        display: block;
        padding: 0;
        border-bottom: none;
        background: #fff;
        border: 1px solid var(--border);
        border-top: 3px solid var(--brand);
        border-radius: 6px;
        overflow: hidden;
    }

    .map-area-search dt {
        position: relative;
        width: auto;
        padding: 10px 28px 10px 14px;
        background: var(--mist);
        cursor: pointer;
    }

    .map-area-search dt::after {
        content: '';
        display: block;
        position: absolute;
        right: 14px;
        top: 50%;
        margin-top: -4px;
        border: 5px solid transparent;
        border-top-color: var(--brand);
    }

    .map-area-search dt.open::after {
        margin-top: -6px;
        border-top-color: transparent;
        border-bottom-color: var(--brand);
    }

    .map-area-search dd {
        display: none;
        min-width: 0;
        max-height: 220px;
        overflow-y: auto;
    }

    .map-area-search dd ul { display: block; }

    .map-area-search dd li a {
        display: block;
        padding: 8px 14px;
        color: var(--ink);
        border-top: 1px solid var(--mist);
    }

    .map-area-search dd li:first-child a { border-top: none; }
    .map-area-search dd li:nth-child(even) a { background: var(--mist); }
    .map-area-search dd li a:hover { background: var(--border); text-decoration: none; }
    .map-area-search dd li + li::before { content: none; }
}
