/* Reset and fullscreen layout */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



html,

body {

    margin: 0;

    padding: 0;

    width: 100%;

    height: 100%;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    background-color: #f4f7f9;

}



#app {

    width: calc(100vw - 40px);

    height: calc(100vh - 40px);

    margin: 20px auto;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);

    background: #fff;

    position: relative;

}



.header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 0.75rem 1rem;

    background: #fff;

    border-bottom: 1px solid #e0e0e0;

    flex-shrink: 0;

    z-index: 1000;

    border-radius: 12px 12px 0 0;

}



.header-controls {

    display: flex;

    align-items: center;

    gap: 1rem;

}



#bottom-pin-count {

    text-align: center;

    font-size: 0.85rem;

    color: #666;

    padding: 10px 0;

    margin-bottom: 10px;

    border-top: 1px dashed #ccc;

}



.title {

    font-size: 1.5rem;

    font-weight: 700;

    color: #333;

    margin: 0;

}



.controls {

    display: flex;

    gap: 1rem;

    align-items: center;

}



.zoom-display {

    background: rgba(0, 123, 255, 0.1);

    color: #007bff;

    padding: 0.5rem 1rem;

    border-radius: 6px;

    font-size: 0.9rem;

    font-weight: 600;

    border: 1px solid rgba(0, 123, 255, 0.2);

    white-space: nowrap;

}



@media (max-width: 768px) {

    #map-view {

        width: 100% !important;

        flex: 1;

    }

    #app {

        overflow-x: hidden;

        width: 100vw;

    }

}



@media (min-width: 768px) {

    #app {

        width: calc(100vw - 360px);

        margin-right: 340px;

    }

    .main {

        width: 100%;

        max-width: calc(100vw - 360px);

    }

    .search-box-container {

        z-index: 1002;

    }

    .radius-slider-container {

        z-index: 1003;

    }

    .mapboxgl-ctrl-zoom, .mapboxgl-ctrl {

        z-index: 1004 !important;

    }

    #category-radius-container {

        z-index: 1000;

    }

}



.toggle-label {

    font-size: 0.9rem;

    color: #333;

    font-weight: 500;

}



.toggle-switch {

    position: relative;

    display: inline-block;

    width: 50px;

    height: 24px;

}



.map-container {

    position: relative;

    width: 100%;

    height: 100%;

    overflow: hidden;

}



@media (min-width: 768px) {

    .map-container {

        margin-right: 0;

    }

    .radius-slider-container {

        z-index: 1003;

    }

    .mapboxgl-ctrl-zoom, .mapboxgl-ctrl {

        z-index: 1004 !important;

    }

}



.toggle-switch input {

    opacity: 0;

    width: 0;

    height: 0;

}



.slider {

    position: absolute;

    cursor: pointer;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background-color: #ccc;

    transition: .4s;

    border-radius: 24px;

}



.slider:before {

    position: absolute;

    content: "";

    height: 18px;

    width: 18px;

    left: 3px;

    bottom: 3px;

    background-color: white;

    transition: .4s;

    border-radius: 50%;

}



input:checked+.slider {

    background-color: #007bff;

}



input:checked+.slider:before {

    transform: translateX(26px);

}



.language-toggle {

    background: #007bff;

    color: white;

    border: none;

    padding: 0.5rem 1rem;

    border-radius: 6px;

    cursor: pointer;

    font-size: 0.9rem;

    transition: background-color 0.2s;

}



.language-toggle:hover {

    background: #0056b3;

}



.main {

    display: flex;

    flex: 1;

    overflow: hidden;

    height: calc(100vh - 100px);

    border-radius: 0 0 12px 12px;

}



.radius-slider-container {

    position: absolute;

    top: 20px;

    right: 20px;

    background: rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(10px);

    border-radius: 12px;

    padding: 16px;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);

    border: 1px solid rgba(0, 0, 0, 0.1);

    z-index: 1000;

    min-width: 280px;

}



.radius-slider-content {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.radius-slider-label {

    font-size: 14px;

    font-weight: 600;

    color: #333;

    display: flex;

    align-items: center;

    gap: 8px;

}



.radius-slider-label span#radius-value {

    font-weight: 700;

    color: #007bff;

    min-width: 60px;

    text-align: center;

    background: #f8f9fa;

    padding: 2px 8px;

    border-radius: 4px;

}



.radius-slider {

    width: 100%;

    height: 6px;

    background: #e9ecef;

    border-radius: 3px;

    outline: none;

    -webkit-appearance: none;

    appearance: none;

    cursor: pointer;

}



.radius-slider::-webkit-slider-thumb {

    -webkit-appearance: none;

    appearance: none;

    width: 20px;

    height: 20px;

    background: #007bff;

    border-radius: 50%;

    cursor: pointer;

    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);

    transition: all 0.2s ease;

}



.radius-slider::-webkit-slider-thumb:hover {

    background: #0056b3;

    box-shadow: 0 2px 12px rgba(0, 123, 255, 0.5);

    transform: scale(1.1);

}



.radius-slider-marks {

    display: flex;

    justify-content: space-between;

    font-size: 11px;

    color: #666;

    font-weight: 500;

}



.pin-sidebar {

    width: 360px;

    flex-shrink: 0;

    background: #fff;

    border-left: 1px solid #e0e0e0;

    padding: 1rem;

    overflow-y: auto;

    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);

    height: 100%;

    border-radius: 0 0 0 12px;

}



.pin-list {

    margin-bottom: 1.5rem;

    max-height: calc(100vh - 300px);

    overflow-y: auto;

    padding-right: 0;

    box-sizing: border-box;

    width: 100%;

}



.pin-list-item {

    padding: 0.75rem 1rem;

    margin-bottom: 0.5rem;

    background: #f8f9fa;

    border: 1px solid #e9ecef;

    border-radius: 8px;

    cursor: pointer;

    transition: all 0.2s ease;

    display: flex;

    justify-content: space-between;

    align-items: center;

    width: 100%;

    box-sizing: border-box;

    margin-right: 0;

}



.pin-list-item:hover {

    background: #e3f2fd;

    border-color: #2196f3;

    transform: translateX(4px);

    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);

    width: calc(100% - 4px);

    margin-right: 4px;

}



.pin-list-item:active {

    transform: translateX(2px);

    box-shadow: 0 1px 4px rgba(33, 150, 243, 0.2);

    width: calc(100% - 2px);

    margin-right: 2px;

}



.status-dot {

    display: inline-block;

    width: 12px;

    height: 12px;

    border-radius: 50%;

    margin-right: 8px;

    vertical-align: middle;

    border: 1px solid rgba(0, 0, 0, 0.1);

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

}



.pin-list-item-name {

    font-weight: 600;

    color: #333;

    font-size: 0.9rem;

    flex: 1;

    display: flex;

    align-items: center;

}



.pin-list-item-radius {

    font-size: 0.8rem;

    color: #666;

    background: #fff;

    padding: 0.25rem 0.5rem;

    border-radius: 12px;

    border: 1px solid #ddd;

}



.pin-list-empty {

    text-align: center;

    color: #999;

    padding: 2rem 1rem;

    font-style: italic;

}



.mapboxgl-popup {

    font-size: 0.9rem;

}



.mapboxgl-popup-content {

    padding: 16px !important;

    border-radius: 16px !important;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;

    min-width: 240px;

    background: #fff;

}



.popup-content {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.popup-memo {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    font-weight: 600;

    color: #333;

    font-size: 15px;

    gap: 8px;

}



.popup-title-text {
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* 余裕を持たせて最大4行に変更 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-all; /* 単語の途中でも枠の端で強制的に折り返す（アイコンの孤立防止） */
    overflow-wrap: anywhere;
    line-height: 1.4;
}

/* 内部のspanタグがブロック化して改行されるのを防ぐ */
.popup-title-text span {
    display: inline;
    white-space: normal;
}


.popup-actions {
    display: flex;
    justify-content: flex-end; /* 右寄せにする */
    width: 100%; /* 横幅いっぱいに広げる */
    gap: 8px;
    flex-shrink: 0;
    padding-top: 4px; /* テキストとの間に少し余白を持たせる */
    border-top: 1px dashed #eee; /* 上にうっすらと区切り線を入れる */
}



.popup-edit-name,

.popup-delete-icon {

    background: transparent;

    border: none;

    cursor: pointer;

    font-size: 16px;

    padding: 6px;

    border-radius: 8px;

    transition: background-color 0.2s ease, transform 0.1s;

    display: flex;

    align-items: center;

    justify-content: center;

}



.popup-edit-name:hover { background: #f0f8ff; transform: scale(1.05); }

.popup-delete-icon:hover { background: #fff0f0; transform: scale(1.05); }



.popup-color-control,

.popup-radius-control {

    margin: 0;

    padding: 0;

    border: none !important;

}



.popup-radius-control {

    background: #f8f9fa;

    padding: 12px;

    border-radius: 12px;

}



.popup-radius-label {

    display: block;

    font-size: 13px;

    color: #555;

    margin-bottom: 8px;

    font-weight: 600;

}



.popup-radius-slider {

    width: 100%;

    height: 6px;

    border-radius: 3px;

    background: #e9ecef;

    outline: none;

    -webkit-appearance: none;

    appearance: none;

    cursor: pointer;

}



.popup-radius-slider::-webkit-slider-thumb {

    -webkit-appearance: none;

    appearance: none;

    width: 20px;

    height: 20px;

    border-radius: 50%;

    background: #007bff;

    cursor: pointer;

    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);

    transition: transform 0.2s ease;

}



.popup-radius-slider::-webkit-slider-thumb:hover {

    transform: scale(1.15);

}



.color-btn {

    flex: 1;

    padding: 10px 16px;

    border: 1px solid #ddd;

    border-radius: 8px;

    background: #fff;

    cursor: pointer;

    font-size: 13px;

    font-weight: 500;

    transition: all 0.2s ease;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    min-height: 40px;

}



.color-btn:hover {

    background: #f8f9fa;

    border-color: #007bff;

    transform: translateY(-1px);

    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);

}



.color-btn.active {

    background: #007bff;

    border-color: #007bff;

    color: white;

    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.3);

    transform: translateY(-1px);

}



.color-btn[data-color="red"].active {

    background: #ff4444;

    border-color: #ff4444;

    box-shadow: 0 3px 12px rgba(255, 68, 68, 0.3);

}



.color-btn[data-color="yellow"].active {

    background: #ffc107;

    border-color: #d39e00;

    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);

}



.popup-color-switch {

    display: flex;

    gap: 8px;

}



.pin-color-palette {

    display: flex !important;

    flex-direction: row !important;

    gap: 8px !important;

    position: absolute !important;

    z-index: 1001 !important;

    background: rgba(255, 255, 255, 0.95) !important;

    padding: 6px !important;

    border-radius: 10px !important; /* モード切替ボタンと同じ長四角角丸 */

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;

    backdrop-filter: blur(10px) !important;

    border: 1px solid rgba(255, 255, 255, 0.2) !important;

    opacity: 0;

    visibility: hidden;

    transition: opacity 0.3s ease, visibility 0.3s ease;

}



.pin-color-palette.visible {

    opacity: 1;

    visibility: visible;

}



.color-palette-btn {

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 10px 16px;

    background: #ffffff;

    border: 2px solid #e0e0e0;

    border-radius: 8px;

    cursor: pointer;

    font-size: 13px;

    font-weight: bold;

    color: #555555;

    transition: all 0.2s ease;

    white-space: nowrap;

    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

}



.color-palette-btn:hover {

    transform: translateY(-2px);

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

}



.color-palette-btn.active {

    transform: scale(1.05);

}



.color-palette-btn[data-color="blue"].active {

    background: #007bff;

    color: #ffffff;

    border-color: #0056b3;

    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);

}



.color-palette-btn[data-color="red"].active {

    background: #ff4444;

    color: #ffffff;

    border-color: #cc0000;

    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);

}



.color-palette-btn[data-color="yellow"].active {

    background: #ffc107;

    color: #333333;

    border-color: #d39e00;

    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);

}



.context-menu-popup {

    z-index: 1002;

}



.context-menu-container {

    padding: 0;

    margin: 0;

    min-width: 180px;

}



.context-menu-item {

    display: block;

    width: 100%;

    padding: 10px 14px;

    background: #fff;

    border: 1px solid #e9ecef;

    border-radius: 6px;

    cursor: pointer;

    text-align: left;

    font-size: 13px;

    font-family: inherit;

    transition: all 0.2s ease;

    box-sizing: border-box;

    margin: 0;

}



.context-menu-item:hover {

    background: #007bff;

    border-color: #007bff;

    color: #fff;

    transform: translateY(-1px);

    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);

}



.overlap-popup-container {

    min-width: 280px;

    max-width: 400px;

    padding: 0;

    margin: 0;

}



.overlap-popup-header {

    padding: 12px 16px;

    background: #f8f9fa;

    border-bottom: 1px solid #e9ecef;

    border-radius: 6px 6px 0 0;

    margin: 0;

}



.overlap-popup-title {

    margin: 0;

    font-size: 14px;

    font-weight: 600;

    color: #495057;

    text-align: center;

    line-height: 1.4;

}



.overlap-popup-list {

    list-style: none;

    padding: 10px;

    margin: 0;

    max-height: 200px;

    overflow-y: auto;

}



.overlap-pin-item {

    display: block;

    width: 100%;

    padding: 10px 12px;

    margin-bottom: 6px;

    background: #f8f9fa;

    border: 1px solid #e9ecef;

    border-radius: 6px;

    cursor: pointer;

    text-align: left;

    border: none;

    font-size: 13px;

    font-family: inherit;

    transition: all 0.2s ease;

    box-sizing: border-box;

    min-height: 44px;

}



.overlap-pin-item:hover {

    background: #e3f2fd;

    border-color: #2196f3;

    transform: translateY(-1px);

}



.overlap-pin-name {

    display: block;

    font-weight: 500;

    color: #333;

    text-align: left;

    flex: 1;

}



.overlap-pin-radius {

    display: block;

    font-size: 11px;

    color: #666;

    background: #fff;

    padding: 4px 8px;

    border-radius: 10px;

    border: 1px solid #dee2e6;

    margin-top: 4px;

    text-align: center;

    font-weight: 500;

    width: fit-content;

}



.pin-list-item.highlighted {

    background: #fff3cd;

    border-color: #ffc107;

    transform: translateX(4px);

    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);

}



.popup-delete {

    background: #dc3545;

    color: white;

    border: none;

    padding: 12px 20px;

    border-radius: 8px;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;

    margin: 0;

    transition: all 0.2s ease;

    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);

}



.popup-delete:hover {

    background: #c82333;

    transform: translateY(-1px);

    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.3);

}



.dual-search-container {

    width: 300px; 

    transition: width 0.3s ease;

}



@media (max-width: 768px) {

    html, body {

        height: 100%;

        overflow: hidden;

    }

    #app {

        width: 100vw;

        height: 100vh;

        margin: 0;

        border-radius: 0;

        box-shadow: none;

        overflow: hidden;

        position: relative;

    }

    #map-view {

        height: 100%;

        position: relative;

    }

    .header {

        padding: 0.35rem 0.75rem;

        flex-shrink: 0;

        min-height: 0;

    }

    .title {

        font-size: 1.1rem;

    }

    .main {

        flex-direction: column;

        overflow: visible;

        height: calc(100vh - 46px);

        border-radius: 0;

        position: relative;

    }

    .map-container {

        flex: 1;

        height: 100%;

        width: 100%;

        min-height: 0;

        position: relative;

    }

    .pin-sidebar {

        position: fixed;

        bottom: 0;

        left: 0;

        width: 100%;

        height: 25vh;

        min-height: 80px;

        border-left: none;

        border-top: none;

        border-radius: 20px 20px 0 0;

        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.15);

        background: #fff;

        overflow: visible !important;

        -webkit-overflow-scrolling: touch;

        padding: 0 1rem 80px;

        z-index: 1000;

        will-change: height;

        touch-action: none;

    }

    .pin-list {

        height: 100%;

        overflow-y: auto;

    }

    .bottom-sheet-handle {

        display: flex;

        justify-content: center;

        align-items: center;

        padding: 10px 0 6px;

        cursor: grab;

        flex-shrink: 0;

        position: sticky;

        top: 0;

        background: #fff;

        z-index: 1;

        border-radius: 20px 20px 0 0;

    }

    .bottom-sheet-handle::before {

        content: '';

        display: block;

        width: 40px;

        height: 4px;

        background: #d1d1d6;

        border-radius: 2px;

    }

    .language-toggle {

        display: none;

    }

    .zoom-display {

        font-size: 0.75rem;

        padding: 0.3rem 0.6rem;

    }

    .dual-search-container {

        width: 140px !important;

        display: flex !important;

        flex-direction: column;

        gap: 8px;

        transition: width 0.3s ease !important;

        overflow: visible;

    }

    .dual-search-container:focus-within {

        width: calc(100vw - 20px) !important;

        max-width: none;

        background: rgba(255, 255, 255, 0.95);

        padding: 8px;

        border-radius: 12px;

        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    }

    .dual-search-container > * {

        width: 100% !important;

        box-sizing: border-box;

        transition: width 0.3s ease;

    }

    .mapboxgl-ctrl-top-right {

        margin-top: 10px !important;

        margin-right: 10px !important;

        z-index: 9999 !important;

    }

    .location-button {

        position: absolute !important;

        top: -60px !important;

        right: 10px !important;

        z-index: 900 !important;

    }

}



.pin-folders {

    padding: 8px;

}



.folder-details {

    margin-bottom: 12px;

    border: 1px solid #e0e0e0;

    border-radius: 8px;

    background: white;

    overflow: hidden;

}



.folder-summary {

    padding: 12px 16px;

    cursor: pointer;

    display: flex;

    align-items: center;

    background: #f8f9fa;

    border: none;

    font-size: 14px;

    font-weight: 600;

    color: #333;

    transition: background-color 0.2s;

}



.folder-summary:hover {

    background: #e9ecef;

}



.folder-icon {

    margin-right: 8px;

    font-size: 16px;

}



.folder-name {

    flex: 1;

}



.folder-toggle-btn {

    margin-left: auto;

    padding: 4px 8px;

    background: none;

    border: none;

    cursor: pointer;

    font-size: 12px;

    color: #666;

    transition: color 0.2s;

}



.folder-delete-btn {

    margin-left: 4px;

    padding: 4px 8px;

    background: none;

    border: none;

    cursor: pointer;

    font-size: 12px;

    color: #666;

    transition: all 0.2s;

}



.folder-delete-btn:hover {

    color: #dc3545;

    background: #fff5f5;

    border-radius: 4px;

    transform: scale(1.1);

}



.folder-visibility-btn,

.folder-radius-btn,

.folder-delete-btn {

    position: relative !important;

    z-index: 10 !important;

    pointer-events: auto !important;

    -webkit-tap-highlight-color: transparent !important;

    -webkit-touch-callout: none !important;

    -webkit-user-select: none !important;

    user-select: none !important;

}



@media (max-width: 768px) {

    .folder-visibility-btn,

    .folder-radius-btn,

    .folder-delete-btn {

        position: relative !important;

        z-index: 9999 !important; 

        pointer-events: auto !important;

        touch-action: manipulation !important;

        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.1) !important;

        transform: translateZ(0) !important;

        will-change: transform !important;

    }

    

    .folder-header {

        position: relative !important;

        z-index: 9998 !important; 

        overflow: visible !important;

    }

    

    .folder-header > div:last-child {

        position: relative !important;

        z-index: 9999 !important; 

        overflow: visible !important;

    }

}



.folder-visibility-btn:hover,

.folder-radius-btn:hover,

.folder-delete-btn:hover {

    transform: scale(1.05);

    transition: transform 0.2s ease;

}



.folder-radius-btn {

    margin-left: 4px;

    padding: 4px 8px;

    background: none;

    border: none;

    cursor: pointer;

    font-size: 12px;

    color: #666;

    transition: all 0.2s;

}



.folder-radius-btn:hover {

    color: #28a745;

    background: #f0fff4;

    border-radius: 4px;

    transform: scale(1.1);

}



.folder-content {

    padding: 0; /* 枠いっぱいに広げる */

    background: #fafafa;

}



.folder-content .pin-list-item {

    background: white;

    border: none; /* 重複する枠線を消す */

    border-bottom: 1px solid #f0f0f0; /* 区切り線だけ残す */

    margin: 0; /* マージンをゼロにしてはみ出しを防ぐ */

    padding: 12px 16px 12px 36px; /* 左のpaddingを大きくしてインデント（字下げ）を作る */

    border-radius: 0; /* フォルダ内なので角丸をなくしてスッキリさせる */

    width: 100%;

}



.folder-content .pin-list-item:last-child {

    border-bottom: none; /* 一番下のピンの区切り線は消す */

}



.folder-content .pin-list-item:hover {

    background: #f0f8ff; /* ホバー時の色を少し優しく */

    transform: none; /* フォルダ内では横に動くアニメーションをオフにする（はみ出し防止） */

    box-shadow: none;

    width: 100%;

    margin-right: 0;

}



.clear-all-btn {

    width: 100%;

    padding: 12px;

    margin-bottom: 16px;

    border: none;

    border-radius: 6px;

    background: #dc3545;

    color: white;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: background-color 0.2s;

}



.settings-open-btn {

    background: rgba(0, 123, 255, 0.08);

    border: 1px solid rgba(0, 123, 255, 0.2);

    color: #007bff;

    border-radius: 8px;

    padding: 0.35rem 0.7rem;

    font-size: 1.1rem;

    cursor: pointer;

    transition: all 0.2s ease;

    line-height: 1;

}



#map-view {

    display: flex;

    flex-direction: column;

    width: 100%;

    height: 100%;

}



#settings-view {

    position: fixed;

    inset: 0;

    width: 100%;

    height: 100vh;

    flex-direction: column;

    overflow-y: auto;

    -webkit-overflow-scrolling: touch;

    background: #f2f2f7;

    z-index: 2000;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

}



.settings-nav-bar {

    position: sticky;

    top: 0;

    z-index: 10;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: #fff;

    border-bottom: 1px solid #e0e0e0;

    padding: 0 16px;

    height: 52px;

    flex-shrink: 0;

}



.settings-back-btn {

    background: none;

    border: none;

    color: #007bff;

    font-size: 15px;

    font-weight: 500;

    cursor: pointer;

    padding: 8px 0;

    min-width: 80px;

    text-align: left;

    transition: opacity 0.2s;

}



.settings-nav-title {

    font-size: 17px;

    font-weight: 600;

    color: #1c1c1e;

    margin: 0;

}



.settings-content {

    padding: 24px 16px 60px;

    max-width: 640px;

    margin: 0 auto;

    width: 100%;

    box-sizing: border-box;

}



.settings-section {

    margin-bottom: 28px;

}



.settings-section-label {

    font-size: 12px;

    font-weight: 600;

    color: #8e8e93;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    margin-bottom: 8px;

    padding-left: 4px;

}



.settings-card {

    background: #fff;

    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);

}



.settings-row {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 14px 16px;

    border-bottom: 1px solid #f0f0f0;

    box-sizing: border-box;

    width: 100%;

}



.settings-row-icon {

    font-size: 20px;

    width: 28px;

    text-align: center;

    flex-shrink: 0;

}



.settings-row-label {

    flex: 1;

    font-size: 15px;

    font-weight: 500;

    color: #1c1c1e;

    text-align: left;

}



.settings-row-btn {

    background: none;

    border: none;

    cursor: pointer;

    transition: background-color 0.15s;

    text-decoration: none;

}



.settings-row-danger .settings-row-label {

    color: #e74c3c;

}



.settings-row-vertical {

    flex-direction: column;

    align-items: stretch;

    gap: 10px;

}



.settings-row-top {

    display: flex;

    align-items: center;

    gap: 12px;

}



.settings-radius-badge {

    font-size: 14px;

    font-weight: 700;

    color: #007bff;

    background: #f0f8ff;

    border: 1px solid #cce4ff;

    border-radius: 12px;

    padding: 3px 10px;

    white-space: nowrap;

    margin-left: auto;

}



.settings-slider {

    width: 100%;

    height: 6px;

    background: #e9ecef;

    border-radius: 3px;

    outline: none;

    -webkit-appearance: none;

    appearance: none;

    cursor: pointer;

}



.settings-slider::-webkit-slider-thumb {

    -webkit-appearance: none;

    width: 22px;

    height: 22px;

    background: #007bff;

    border-radius: 50%;

    cursor: pointer;

    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.35);

}



.settings-slider-labels {

    display: flex;

    justify-content: space-between;

    font-size: 11px;

    color: #8e8e93;

    padding: 0 2px;

}



.settings-footer {

    text-align: center;

    font-size: 13px;

    color: #8e8e93;

    padding-top: 8px;

}



.settings-select {

    padding: 6px 10px;

    border: 1px solid #ddd;

    border-radius: 6px;

    font-size: 0.9rem;

    color: #333;

    background-color: #f8f9fa;

    outline: none;

    cursor: pointer;

    transition: border-color 0.2s, box-shadow 0.2s;

    font-weight: 500;

}



.settings-pro-btn {

    width: 100%;

    padding: 12px;

    border: none;

    border-radius: 8px;

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    color: white;

    font-size: 0.95rem;

    font-weight: 700;

    cursor: pointer;

    transition: transform 0.2s, box-shadow 0.2s;

    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 8px;

}



.pro-badge {

    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);

    color: #d11a2a;

    font-size: 0.7rem;

    font-weight: 700;

    padding: 3px 8px;

    border-radius: 12px;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    border: 1px solid rgba(209, 26, 42, 0.2);

}



@media (min-width: 768px) {

    #settings-view {

        position: absolute;

    }

    .settings-content {

        padding: 32px 24px 60px;

        max-width: 600px;

    }

}



#pin-sidebar,

.folder-header,

.folder-visibility-btn,

.folder-radius-btn,

.folder-delete-btn {

    -webkit-user-select: none !important;

    user-select: none !important;

    -webkit-touch-callout: none !important;

}



.folder-visibility-btn:hover,

.folder-visibility-btn:active {

    background-color: #f0f8ff !important;

    border-radius: 6px;

}



/* ============================================================
   【完全版】地図操作ツール＆パレットの配置（PC/スマホ共通）
   ============================================================ */
.mode-segment-container {
    position: absolute !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    display: flex !important;
    justify-content: center !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* PC（769px以上）の配置：L字型スマートレイアウト */
@media (min-width: 769px) {
    .mode-segment-container,
    .location-button,
    .terrain-button,
    .pin-color-palette {
        position: absolute !important;
        transition: right 0.3s ease !important;
    }

    /* 🧭 コンパス（右下基準点） */
    .location-button { right: 380px !important; bottom: 20px !important; top: auto !important; left: auto !important; }
    /* ⛰️ 3D地形（コンパスの真上） */
    .terrain-button { right: 380px !important; bottom: 80px !important; top: auto !important; left: auto !important; }
    /* ✋ カプセル（コンパスの左隣） */
    .mode-segment-container { right: 440px !important; bottom: 20px !important; top: auto !important; left: auto !important; transform: none !important; }
    /* 🎨 色パレット（カプセルの真上） */
    .pin-color-palette { right: 440px !important; bottom: 80px !important; top: auto !important; left: auto !important; transform: none !important; }
}


/* スマホの配置 */

@media (max-width: 768px) {

    .mode-segment-container {

        top: -60px !important;

        left: 50% !important;

        bottom: auto !important;

        right: auto !important;

        transform: translateX(-50%) !important;

    }

    /* スマホ版：色パレットをカプセル(-60px)のさらに上に配置 */
    .pin-color-palette {
        top: -120px !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translateX(-50%) !important;
    }
}



.mode-segment {

    display: inline-flex !important;

    flex-direction: row !important;

    align-items: center !important;

    justify-content: center !important;

    background: rgba(255, 255, 255, 0.95) !important;

    border-radius: 30px !important; /* カプセル型に復元 */

    padding: 6px !important;

    gap: 8px !important; /* ボタン間の隙間 */

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;

    backdrop-filter: blur(10px) !important;

    border: 1px solid rgba(255, 255, 255, 0.2) !important;

    pointer-events: auto !important;

    width: max-content !important;

    min-width: min-content !important;

    max-width: none !important;

}



.mode-segment-btn {

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    flex: 0 0 44px !important; /* 44pxから絶対に伸ばさない */

    width: 44px !important;

    height: 44px !important;

    padding: 0 !important;

    margin: 0 !important;

    border: none !important;

    background: transparent !important;

    border-radius: 50% !important; /* 丸いホバーエフェクト */

    cursor: pointer !important;

    transition: all 0.2s ease !important;

    color: #666 !important;

}



.mode-segment-icon {

    font-size: 22px !important;

    line-height: 1 !important;

    display: block !important;

    margin: 0 !important;

}



.mode-segment-btn:hover {

    background: rgba(33, 150, 243, 0.1) !important;

    color: #2196f3 !important;

    transform: scale(1.05) !important;

}



.mode-segment-btn.active {

    background: #2196f3 !important;

    color: white !important;

    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4) !important;

    transform: scale(1.05) !important;

}



/* ============================================================

   ホテル検索UI（アフィリエイトハブ）

   ============================================================ */

.hotel-fab-button {

    position: fixed;

    bottom: 20px;

    left: 50%;

    transform: translateX(-50%);

    background: linear-gradient(135deg, #007bff, #0056b3);

    color: white;

    border: none;

    border-radius: 30px;

    padding: 14px 24px;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);

    z-index: 9999 !important; /* 地図のコントロールより確実に手前へ */

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    white-space: nowrap;

    border: 2px solid rgba(255, 255, 255, 0.2);

    touch-action: manipulation !important;

    -webkit-tap-highlight-color: transparent !important;

}



.hotel-fab-button:hover {

    transform: translateX(-50%) translateY(-2px) scale(1.02);

    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.5);

    background: linear-gradient(135deg, #0056b3, #004085);

}



.hotel-bottom-sheet {

    position: fixed;

    bottom: 0;

    left: 0;

    right: 0;

    background: white;

    border-radius: 24px 24px 0 0;

    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);

    z-index: 10000 !important; /* 最高レベルの前面へ */

    transform: translateY(100%);

    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    padding-bottom: env(safe-area-inset-bottom); /* iPhoneX以降のホームバー対応 */

    visibility: hidden; /* 閉まっている時は完全に隠す */

}



.hotel-bottom-sheet.active {

    transform: translateY(0);

    visibility: visible; /* 開いた時だけ実体化する */

}



.hotel-bottom-sheet-handle {

    width: 40px;

    height: 5px;

    background: #e0e0e0;

    border-radius: 3px;

    margin: 12px auto;

    cursor: pointer;

}



.hotel-bottom-sheet-content {

    padding: 16px 24px 32px;

}



.hotel-sheet-title {

    font-size: 18px;

    font-weight: 700;

    color: #333;

    margin-bottom: 4px;

    text-align: center;

}



.hotel-sheet-desc {

    font-size: 13px;

    color: #666;

    margin-bottom: 24px;

    text-align: center;

}



.booking-btn { background: #003580; } /* Booking.comカラー */

.agoda-btn { background: #e12d2d; } /* Agodaカラー */

.expedia-btn { background: #000048; color: #ffc94c; } /* Expediaカラー */

.hotel-icon {

    font-size: 20px;

}



/* ============================================================

   PC（画面が広い場合）のホテル検索UI配置（サイドバー統合型）

   ============================================================ */

@media (min-width: 768px) {

    /* サイドバーの最下部に横長ボタンが被らないよう余白を確保 */

    .pin-sidebar {

        padding-bottom: 90px !important;

    }



    /* 横長ドッシリボタンに変身 */

    .hotel-fab-button {

        position: absolute; /* ウィンドウ基準(fixed)ではなくアプリ枠(#app)基準に変更 */

        bottom: 20px;

        left: 20px; /* サイドバーの左余白に揃える */

        transform: none; /* 中央寄せを解除 */

        width: 320px; /* サイドバーの幅にピッタリ合わせる */

        border-radius: 12px; /* スマホの丸形から、カード型の美しい角丸へ変更 */

        padding: 16px;

        font-size: 16px;

        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);

    }



    .hotel-fab-button:hover {

        transform: translateY(-2px) scale(1.01);

    }



    /* ホテル検索パネルもサイドバー幅にピッタリ重ねて下から出現させる */

    .hotel-bottom-sheet {

        position: absolute; /* アプリ枠基準 */

        max-width: 360px; /* サイドバーの幅に完全固定 */

        left: 0;

        bottom: 0;

        transform: translateY(100%);

        border-radius: 12px 12px 0 12px; /* 上両角と左下を角丸に */

        border-right: 1px solid #e0e0e0;

        border-top: 1px solid #e0e0e0;

        box-shadow: 2px -4px 20px rgba(0, 0, 0, 0.1);

    }

    

    .hotel-bottom-sheet.active {

        transform: translateY(0);

    }

}



/* ============================================================

   PC専用 スポンサー/アフィリエイトバナー枠

   ============================================================ */

/* デフォルト（スマホ）では完全に非表示（DOMのレンダリングツリーからも除外） */

.pc-sponsor-sidebar {

    display: none;

}



/* PCサイズ（768px以上）の時だけ右側の余白に表示 */

@media (min-width: 768px) {

    .pc-sponsor-sidebar {

        display: block;

        position: fixed; /* absoluteから変更し、#appのoverflow:hiddenを回避 */

        top: 20px;

        right: 20px; /* 画面右端から20pxの位置に固定 */

        width: 320px;

        height: calc(100vh - 40px);

        padding: 0;

        z-index: 2000; /* 確実に最前面へ */

        pointer-events: none; /* サイドバー自体はクリック透過 */

    }



    .sponsor-widget-container {

        pointer-events: auto; /* バナーの中身はクリック可能 */

        background: #ffffff;

        border-radius: 12px;

        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

        padding: 16px;

        text-align: center;

        border: 1px solid #eaeaea;

        position: sticky;

        top: 20px;

    }



    .sponsor-label {

        display: block;

        font-size: 11px;

        color: #888;

        text-transform: uppercase;

        letter-spacing: 1px;

        margin-bottom: 12px;

        text-align: left;

        font-weight: 600;

    }



    .dummy-banner {

        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

        border: 2px dashed #ced4da;

        border-radius: 8px;

        width: 100%;

        min-height: 250px;

        display: flex;

        flex-direction: column;

        align-items: center;

        justify-content: center;

        color: #6c757d;

        font-weight: 700;

        font-size: 14px;

        line-height: 1.6;

        transition: all 0.3s ease;

    }



    .dummy-banner small {

        font-weight: normal;

        font-size: 11px;

        margin-top: 8px;

    }

}



/* ============================================================

   Paywall (課金の壁) モーダルスタイル

   ============================================================ */

.paywall-overlay {

    position: fixed;

    top: 0;

    left: 0;

    width: 100vw;

    height: 100vh;

    background: rgba(0, 0, 0, 0.6);

    backdrop-filter: blur(4px);

    z-index: 20000; /* 最高レベルの前面 */

    display: none;

    align-items: center;

    justify-content: center;

    opacity: 0;

    transition: opacity 0.3s ease;

}



.paywall-overlay.active {

    opacity: 1;

}



.paywall-container {

    background: #ffffff;

    width: 90%;

    max-width: 800px;

    border-radius: 20px;

    padding: 32px 24px;

    position: relative;

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);

    transform: translateY(20px);

    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    max-height: 90vh;

    overflow-y: auto;

}



.paywall-overlay.active .paywall-container {

    transform: translateY(0);

}



.paywall-close-btn {

    position: absolute;

    top: 16px;

    right: 16px;

    background: #f0f0f0;

    border: none;

    width: 32px;

    height: 32px;

    border-radius: 50%;

    font-size: 16px;

    cursor: pointer;

    color: #666;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: background 0.2s;

}



.paywall-close-btn:hover {

    background: #e0e0e0;

    color: #333;

}



.paywall-header {

    text-align: center;

    margin-bottom: 32px;

}



.paywall-header h2 {

    font-size: 24px;

    color: #1c1c1e;

    margin-bottom: 12px;

    line-height: 1.4;

}



.paywall-header p {

    color: #666;

    font-size: 14px;

    max-width: 500px;

    margin: 0 auto;

    line-height: 1.6;

}



.paywall-plans {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    gap: 16px;

}



.paywall-plan-card {

    border: 1px solid #e0e0e0;

    border-radius: 16px;

    padding: 24px 16px;

    position: relative;

    display: flex;

    flex-direction: column;

    background: #fff;

}



.paywall-plan-card.disabled {

    background: #f8f9fa;

    opacity: 0.8;

}



.paywall-plan-card.recommended {

    border: 2px solid #007bff;

    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.15);

    transform: translateY(-4px);

}



.plan-badge {

    position: absolute;

    top: -12px;

    left: 50%;

    transform: translateX(-50%);

    background: #007bff;

    color: white;

    font-size: 11px;

    font-weight: 700;

    padding: 4px 12px;

    border-radius: 20px;

    white-space: nowrap;

}



.plan-name {

    font-size: 16px;

    font-weight: 700;

    color: #333;

    margin-bottom: 8px;

}



.plan-price {

    font-size: 28px;

    font-weight: 800;

    color: #1c1c1e;

    margin-bottom: 16px;

    border-bottom: 1px solid #eee;

    padding-bottom: 16px;

}



.plan-price span {

    font-size: 14px;

    color: #888;

    font-weight: normal;

}



.plan-features {

    list-style: none;

    padding: 0;

    margin: 0 0 24px 0;

    flex: 1;

}



.plan-features li {

    font-size: 13px;

    color: #444;

    margin-bottom: 12px;

    padding-left: 20px;

    position: relative;

    line-height: 1.4;

}



.plan-features li::before {

    content: '✓';

    position: absolute;

    left: 0;

    color: #28a745;

    font-weight: bold;

}



.plan-features li.unavailable {

    color: #999;

}



.plan-features li.unavailable::before {

    content: '✕';

    color: #ccc;

}



.plan-current-label {

    text-align: center;

    font-size: 12px;

    font-weight: 600;

    color: #888;

    padding: 12px 0;

    background: #eee;

    border-radius: 8px;

    margin-top: auto;

}



.paywall-action-btn {

    width: 100%;

    padding: 12px;

    border: none;

    border-radius: 8px;

    background: linear-gradient(135deg, #007bff, #0056b3);

    color: white;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition: transform 0.2s, box-shadow 0.2s;

    margin-top: auto;

}



.paywall-action-btn:hover {

    transform: translateY(-2px);

    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);

}



.paywall-action-btn.secondary {

    background: #333;

}



.paywall-action-btn.secondary:hover {

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

}



@media (max-width: 768px) {

    .paywall-plans {

        grid-template-columns: 1fr;

    }

    .paywall-plan-card.recommended {

        transform: none;

    }

    .paywall-header h2 {

        font-size: 20px;

    }

}



/* ============================================================

   iOS Safariの自動ズーム防止（16pxルールの適用）

   ============================================================ */

.dual-search-container input,

.mapboxgl-ctrl-geocoder--input {

    font-size: 16px !important;

}



/* ついでに、Paywallの鍵付き入力欄の文字サイズも16pxに統一 */

.searchbox-search input {

    font-size: 16px !important;

}



/* ============================================================

   アイソクローン用 ターゲットカーソル

   ============================================================ */

.center-target-marker {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -100%);

    font-size: 36px;

    pointer-events: none; /* クリックを邪魔しない */

    z-index: 1000;

    display: none; /* 初期は非表示 */

    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));

    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);

}



.center-target-marker.active {

    display: block;

    animation: bounceIn 0.5s ease;

}



@keyframes bounceIn {

    0% { transform: translate(-50%, -150%) scale(0.5); opacity: 0; }

    50% { transform: translate(-50%, -100%) scale(1.1); opacity: 1; }

    100% { transform: translate(-50%, -100%) scale(1); }

}



/* スマホ画面でアイソクローンの照準を上にずらす（ボトムシートとの被り防止） */

@media (max-width: 768px) {

    .center-target-marker {

        top: 30% !important;

    }

}



/* ============================================================

   スマホ版：3D地形ボタンの配置補正（ボトムシート連動）

   ============================================================ */

@media (max-width: 768px) {

    .terrain-button {

        position: absolute !important;

        top: -115px !important; /* 🧭コンパスボタン(-60px)のさらに上に配置 */

        right: 10px !important;

        bottom: auto !important; /* JSの固定値を上書きして解除 */

        z-index: 900 !important;

    }

}



.mapboxgl-ctrl-top-right .mapboxgl-ctrl-scale {

    margin-top: 10px;

    margin-right: 10px;

    background-color: rgba(255, 255, 255, 0.9) !important;

    border: 2px solid #333 !important;

    border-top: none !important;

    font-weight: bold !important;

    color: #333 !important;

    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;

    border-radius: 0 0 4px 4px;

}



/* 測定ボタンの左側に薄い区切り線を追加 */

#mode-measure-btn {

    position: relative !important;

    border-radius: 50% !important; /* ボタンの丸みを維持 */

    border: none !important;

}



#mode-pin-btn {

    border-radius: 50% !important; /* 丸みを維持 */

}



/* 測定ボタンの左側の隙間（gap: 8px の中央）に美しい縦線を引く */

#mode-measure-btn::before {

    content: "" !important;

    position: absolute !important;

    left: -4px !important; /* 隙間のど真ん中に配置 */

    top: 50% !important;

    transform: translateY(-50%) !important;

    width: 1px !important;

    height: 24px !important; /* カプセルより少し短い上品な長さ */

    background-color: rgba(0, 0, 0, 0.15) !important;

    pointer-events: none !important;

}



/* ============================================================

   ログインボタン（ヘッダー用）

   ============================================================ */

.header-login-btn {

    background: #007bff;

    color: white;

    border: none;

    padding: 8px 16px;

    border-radius: 20px;

    cursor: pointer;

    font-weight: 600;

    font-size: 13px;

    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);

    transition: all 0.2s ease;

    white-space: nowrap;

    font-family: inherit;

}



.header-login-btn:hover {

    background: #0056b3;

    transform: translateY(-1px);

    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);

}



/* ============================================================

   到達圏パネル：交通手段アイコン（横並び）

   ============================================================ */

/* 親コンテナ（横に並べて中央寄せ） */

.hotel-links-container {

    display: flex !important;

    flex-direction: row !important; /* 横並びにする */

    justify-content: center !important; /* 中央寄せ */

    gap: 20px; /* アイコン同士の間隔 */

    margin-top: 16px;

    width: 100%;

}



/* 各交通手段ボタン（丸いアイコン） */

.hotel-link-btn {

    background: none;

    color: inherit !important;

    border: none;

    padding: 0 !important;

    cursor: pointer !important;

    transition: all 0.2s ease;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* 影を付けてボタンっぽく */

    display: flex !important;

    align-items: center !important;

    justify-content: center !important; /* アイコンを真ん中に */

    gap: 0 !important;

    /* width, height, border-radius はHTMLインラインスタイルで指定 */

}



/* ホバー時の演出（少し大きく浮かせる） */

.hotel-link-btn:hover {

    transform: translateY(-2px) scale(1.05) !important;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);

}



/* アクティブ（現在選択中）なボタンのスタイル */

.hotel-link-btn.active {

    box-shadow: 0 0 0 3px #007bff, 0 4px 12px rgba(0, 0, 0, 0.2);

    transform: scale(1.05);

}



/* ============================================================

   到達圏パネル：描画をクリアボタン（専用クラス）

   ============================================================ */

.hotel-clear-btn {

    background: #fff;

    color: #dc3545;

    border: 1px solid #dc3545;

    border-radius: 8px; /* 丸くしない */

    padding: 12px;

    width: 100%;

    margin-top: 24px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;

    font-family: inherit;

    display: block;

    text-align: center;

}



.hotel-clear-btn:hover {

    background: #fff5f5;

    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1);

}



/* ============================================================

   Toast Notifications (スタイリッシュな通知UI)

   ============================================================ */

.notification-container {

    position: fixed;

    top: 20px;

    left: 50%;

    transform: translateX(-50%);

    z-index: 99999;

    display: flex;

    flex-direction: column;

    gap: 10px;

    pointer-events: none;

}



.toast-notification {

    background: rgba(33, 33, 33, 0.95);

    color: white;

    padding: 12px 24px;

    border-radius: 30px;

    font-size: 14px;

    font-weight: 500;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

    display: flex;

    align-items: center;

    gap: 8px;

    backdrop-filter: blur(8px);

    animation: toastSlideDown 0.3s ease forwards;

    pointer-events: auto;

    transition: opacity 0.3s ease, transform 0.3s ease;

}



.toast-notification.success { background: rgba(40, 167, 69, 0.95); }

.toast-notification.error { background: rgba(220, 53, 69, 0.95); }

.toast-notification.info { background: rgba(0, 123, 255, 0.95); }



.toast-notification.fade-out {

    opacity: 0 !important;

    transform: translateY(-20px) !important;

    animation: none !important; /* 登場アニメーションのロックを強制解除 */

}



@keyframes toastSlideDown {

    from { opacity: 0; transform: translateY(-20px); }

    to { opacity: 1; transform: translateY(0); }

}



/* ============================================================

   広告パネル（ヘッダー直下・フレックス配置）

   ============================================================ */

.ad-panel {

    width: 100%;

    height: 60px;

    background: #f8f9fa;

    border-bottom: 1px solid #e0e0e0;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0; /* ヘッダーの下に自然に挟み込む */

    color: #666;

    font-size: 13px;

    z-index: 900;

}

/* ============================================================
   【完全版】Proプラン専用レイアウト（PC版の全画面拡張）
   ============================================================ */
/* 1. 広告パネルを完全に非表示 */
body.pro-mode .pc-sponsor-sidebar,
body.pro-mode #ad-panel {
    display: none !important;
}

@media (min-width: 768px) {
    /* 2. アプリ全体の枠を画面中央・幅いっぱいに広げる */
    body.pro-mode #app {
        width: calc(100vw - 40px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        transition: width 0.3s ease, margin 0.3s ease;
    }
    
    /* 3. 地図とパネルを囲う .main の横幅制限(ストッパー)を解除 */
    body.pro-mode .main {
        max-width: none !important;
        width: 100% !important;
    }

    /* ※地図操作ツールは常に .pin-sidebar の左隣(right: 380px)に配置されるため、
       ここで追加の移動指定は不要（自動で追従します） */
}

/* ============================================================
   Freeプラン用 鍵（ロック）アイコンとグレーアウト表示
   ============================================================ */
/* 共通のトランジションとグレー背景色（鍵の黄色を維持） */
body:not(.pro-mode) #mode-measure-btn,
body:not(.pro-mode) #isochrone-fab-button,
body:not(.pro-mode) .terrain-button {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #b0bec5, #90a4ae) !important;
    border-color: #90a4ae !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    color: #ffffff !important;
}

/* 測定ボタン（上）のみ relative を付与（到達圏ボタンの fixed を壊さないため） */
body:not(.pro-mode) #mode-measure-btn {
    position: relative;
}

/* 測定ボタンの鍵の位置（右上） */
body:not(.pro-mode) #mode-measure-btn::after {
    content: "🔒";
    position: absolute;
    top: -4px;
    right: -4px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 11px;
    line-height: 1;
    z-index: 10;
}

/* 到達圏ボタンの鍵の位置（右上） */
body:not(.pro-mode) #isochrone-fab-button::after {
    content: "🔒";
    position: absolute;
    top: -8px;
    right: -8px;
    background: white;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 14px;
    line-height: 1;
    z-index: 10;
}

/* 山のアイコン（地形ボタン）の鍵の位置（右上） */
body:not(.pro-mode) .terrain-button::after {
    content: "🔒";
    position: absolute;
    top: -4px;
    right: -4px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 11px;
    line-height: 1;
    z-index: 10;
}