#map_area { margin-bottom: 20px; }

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

#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(--link-hover); }

/* ===== 地図ピン（番号バッジ＋名前ラベル） ===== */

.temple-map-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.temple-map-pin-icon { display: block; }
.temple-map-pin-label {
    max-width: 80px;
    padding: 1px 5px;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-dark);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.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: #f0f0f0;
    font-size: 15px;
    line-height: 1;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}
.callout-close:hover { background: #e0e0e0; color: #000; }

.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(--text-dark);
}
.callout-score {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 9px;
    margin-bottom: 6px;
    border-radius: 10px;
    background: var(--cta);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.callout-score i { font-size: 10px; }

.callout-address {
    font-size: 12px;
    color: var(--text-mid);
    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-deep); color: #fff; text-decoration: none; }
/* グローバルな a:visited { color: var(--link); } の方が詳細度が高く、訪問済みだと紫背景に
   紫文字が乗って読めなくなるため、要素名まで含めて詳細度を上げて明示的に上書きする */
a.callout-btn--site:visited { color: #fff; }

/* 巡礼順で前後の札所へ移動するボタン（詳細ページのtemple-prev-navと同じ考え方をコールアウト用に縮小） */
.callout-prev-next-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.callout-prev-next {
    flex: 1;
    min-width: 0;
    display: block;
    box-sizing: border-box;
    padding: 6px 4px;
    border-radius: 8px;
    background: var(--mist);
    border: 1px solid var(--border);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--link);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.callout-prev-next:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-decoration: none;
}
/* callout-btn--siteと同じ理由（a:visitedの詳細度勝ち）で明示的に上書きしておく */
a.callout-prev-next:visited { color: var(--link); }
a.callout-prev-next:visited:hover { color: #fff; }
.callout-prev-next--spacer { flex: 1; visibility: hidden; }

.map_navi { margin-top: 24px; }
.map_navi p { font-weight: 700; margin-bottom: 8px; }
.map_navi ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.map_navi ul li a {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--mist);
    color: var(--link);
    font-size: 13px;
}
.map_navi ul li a:hover { background: var(--brand); color: #fff; text-decoration: none; }
.map_navi ul li a.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
