body {
    margin: 0;
    font-family: sans-serif;
}

header {
    padding: 12px 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #cccccc;
}

h1 {
    margin: 0;
    font-size: 24px;
}

#map {
    width: 100%;
    height: 100vh;
}

/* 凡例 */

.legend {
    background: white;
    padding: 8px 10px;
    border: 1px solid #888;
    border-radius: 4px;
    line-height: 1.8;
    font-size: 14px;
}

.legend-toggle {
    display: block;
    width: 100%;
    padding: 4px 6px;
    border: none;
    background: white;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
}

.legend-toggle:hover {
    background-color: #f0f0f0;
}

.legend-content {
    display: block;
    margin-top: 4px;
}

.legend.collapsed .legend-content {
    display: none;
}

.map-information {
    width: 230px;
    margin-top: 6px;
    line-height: 1.5;
    font-size: 12px;
}

.map-information a {
    color: #0066cc;
}

.legend-marker {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border: 2px solid black;
    border-radius: 50%;
    vertical-align: middle;
}

.legend-marker.castle {
    background: red;
}

.legend-marker.noncastle {
    background: blue;
}

.legend-marker.investigating {
    background: gold;
}

/* スマホ用レイヤー開閉 */

.mobile-layer-toggle {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: none;
    background: white;
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
}

.mobile-layer-toggle:hover {
    background-color: #f0f0f0;
}

.mobile-layer-control.collapsed .leaflet-control-layers-list {
    display: none;
}

/* スマホではLeaflet標準の小さいレイヤーアイコンを使わない */
.mobile-layer-control .leaflet-control-layers-toggle {
    display: none;
}

/* スマホ用レイヤーコントロールの見た目 */
.mobile-layer-control {
    background: white;
    border: 1px solid #888;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

/* レイヤー一覧を開いたときの余白 */
.mobile-layer-control .leaflet-control-layers-list {
    padding: 6px 10px 8px 10px;
    margin: 0;
}

/* 地図上のカーソルを十字線にする */

.leaflet-container {
    cursor: crosshair;
}

/* 座標ジャンプ */

.coordinate-jump {
    background: white;
    border: 1px solid #888;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.coordinate-jump-toggle {
    display: block;
    padding: 7px 10px;
    border: none;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.coordinate-jump-toggle:hover {
    background-color: #f0f0f0;
}

.coordinate-jump-panel {
    display: none;
    width: 220px;
    padding: 10px;
    border-top: 1px solid #cccccc;
    box-sizing: border-box;
}

.coordinate-jump.open .coordinate-jump-panel {
    display: block;
}

.coordinate-jump-title {
    margin-bottom: 6px;
    font-weight: bold;
}

.coordinate-jump input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    margin-bottom: 7px;
    border: 1px solid #aaaaaa;
    border-radius: 4px;
    font-size: 14px;
}

.coordinate-jump-button {
    padding: 5px 12px;
    border: 1px solid #666666;
    border-radius: 4px;
    background-color: #f5f5f5;
    cursor: pointer;
}

.coordinate-jump-button:hover {
    background-color: #e5e5e5;
}

.coordinate-jump-guide {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.4;
    color: #555555;
}


/* ========================================
   スマホ用：現在位置ボタン
   ======================================== */

/* PC・タブレットでは非表示 */
.current-location-control {
    display: none;
}

/* スマートフォンのみ表示 */
@media (max-width: 767px) {

    .current-location-control {
        display: block;
    }

    .current-location-button {
        background: white;
        border: 2px solid rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        padding: 7px 10px;
        font-size: 13px;
        font-weight: bold;
        color: #333;
        cursor: pointer;
    }

    .current-location-button:disabled {
        opacity: 0.6;
        cursor: wait;
    }
}
