* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 20px; background-color: #2C3A2D; color: #2C3E2F; }

.mobile-only { display: none; }
.mobile-only-inline { display: none; }
.desktop-only { display: inline-block; }

.search-box { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 15px; background: #DCE3D6; border: 1px solid #C5D1C5; border-top: 4px solid #3A5A40; padding: 15px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); flex-wrap: wrap; color: #2C3E2F; }
select { padding: 10px; border: 1px solid #A3B18A; border-radius: 4px; font-size: 16px; background-color: #F0F5EB; color: #333; cursor: pointer; }
optgroup { font-weight: bold; color: #BC6C25; }
option { color: #333; }
input[type="text"] { padding: 10px; border: 1px solid #A3B18A; border-radius: 4px; font-size: 16px; background-color: #F0F5EB; width: 450px; max-width: 100%; color: #333; }
button { padding: 10px 20px; background-color: #3A5A40; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s; white-space: nowrap; }
button:hover { background-color: #2C422E; }
.manage-btn { background-color: #BC6C25; }
.manage-btn:hover { background-color: #9C5A1D; }

.lang-select { padding: 8px; font-size: 14px; margin-left: 5px; background-color: #DCE3D6; border: 1px solid #A3B18A; }

.user-panel { display: flex; align-items: center; gap: 10px; border-left: 2px solid #A3B18A; padding-left: 15px; flex: none; }
.user-profile { display: flex; align-items: center; gap: 8px; font-weight: bold; font-size: 14px; cursor: pointer; }
.user-profile img { width: 32px; height: 32px; border-radius: 50%; }
.logout-btn { background-color: #A67C52; padding: 6px 12px; font-size: 14px; }
.logout-btn:hover { background-color: #8A6441; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; display: none; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #FCFDFB; padding: 20px; border-radius: 8px; width: 90%; max-width: 600px; z-index: 2001; display: none; box-shadow: 0 4px 25px rgba(0,0,0,0.4); max-height: 85vh; overflow-y: auto; color: #2C3E2F; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #D4E0D4; padding-bottom: 10px; margin-bottom: 15px; }
.modal-header h3 { margin: 0; color: #3A5A40; }
.close-btn { background: transparent; border: none; color: #999; font-size: 20px; cursor: pointer; padding: 0 5px; }

.manager-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; background: #F0F5EB; padding: 15px; border-radius: 6px; align-items: center;}
.manager-form select, .manager-form input[type="text"] { flex: 1; min-width: 130px; font-size: 14px; padding: 8px;}
.manager-form input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; cursor: pointer; }
.checkbox-wrapper { width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 8px; font-size: 14px; color: #555; margin-top: 5px; font-weight: bold;}
.manager-form button { background-color: #3A5A40; }

.list-title { margin: 15px 0 5px 0; color: #555; font-size: 15px; border-bottom: 1px dashed #A3B18A; padding-bottom: 5px;}
.custom-list { list-style: none; padding: 0; margin: 0 0 15px 0; }
.custom-list li { display: flex; justify-content: space-between; align-items: center; background: #F0F5EB; padding: 8px 15px; border-radius: 4px; margin-bottom: 8px; border-left: 3px solid #588157; font-size: 14px;}
.is-public-badge { background: #D4E0D4; color: #2C3E2F; font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-left: 5px; }
.is-private-badge { background: #FFF3E0; color: #E65100; font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-left: 5px; }

.action-btns { display: flex; gap: 5px; }
.edit-btn { background-color: #A67C52; padding: 5px 10px; font-size: 12px; }
.delete-btn { background-color: #d9534f; padding: 5px 10px; font-size: 12px; }
#cancelEditBtn { background-color: #777; display: none; }

.share-content { padding: 10px 0; }
.share-loc-info { display: flex; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #D4E0D4; }
.share-link-box { display: flex; gap: 10px; }
.share-link-box input { flex: 1; padding: 10px; border: 1px solid #A3B18A; border-radius: 4px; background: #F0F5EB; color: #333; font-size: 14px; outline: none; }
.copy-btn { background-color: #FCFDFB; color: #0066CC; border: none; font-weight: bold; padding: 10px 15px; cursor: pointer; white-space: nowrap; font-size: 14px; transition: color 0.2s; }
.copy-btn:hover { color: #004C99; }
.copy-btn.copied { color: #3A5A40; }

.main-container { display: flex; height: 88vh; min-height: 600px; gap: 0; }

#map-area, #map, #map-3d-wrapper { 
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    -khtml-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}

#map-area { width: calc(66.66% - 10px); flex: none; border-radius: 8px; border: 2px solid #19241B; box-shadow: 0 4px 15px rgba(0,0,0,0.3); background-color: #e5e3df; overflow: hidden; position: relative; }
#map { width: 100%; height: 100%; position: absolute; top:0; left:0; z-index: 1; }

#map-3d-wrapper { display: none; width: 100%; height: 100%; position: absolute; top:0; left:0; z-index: 2; }
gmp-map-3d { width: 100%; height: 100%; display: block; }

.map-control-group { display: flex; flex-direction: column; gap: 8px; margin: 10px; }
.earth-control-btn {
    background-color: #FCFDFB; border: none; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    width: 40px; height: 40px; cursor: pointer; display: flex; justify-content: center; align-items: center;
    font-size: 14px; font-weight: bold; color: #555; transition: background-color 0.2s; margin: 0;
}
.earth-control-btn:hover { background-color: #E8EDE3; color: #333; }

.overlay-controls-3d { position: absolute; bottom: 20px; right: 10px; z-index: 10; margin: 0; }

#splitter { width: 20px; flex: none; cursor: col-resize; display: flex; justify-content: center; align-items: center; z-index: 10; transition: background-color 0.2s; background-image: radial-gradient(#888 1px, transparent 0); background-size: 4px 12px; background-position: center; background-repeat: no-repeat; position: relative; }
#splitter:hover, #splitter:active { background-color: rgba(255, 255, 255, 0.1); }
#toggle-panel-btn { position: absolute; width: 16px; height: 40px; background-color: #588157; color: white; display: flex; justify-content: center; align-items: center; border-radius: 4px; cursor: pointer; font-size: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.4); transition: background-color 0.2s; }
#toggle-panel-btn:hover { background-color: #3A5A40; }

.main-container.collapsed #map-area { width: calc(100% - 20px) !important; }
.main-container.collapsed #info-panel { display: none !important; }
.main-container.collapsed #splitter { cursor: default; }

#info-panel { flex: 1; background: #FCFDFB; padding: 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); overflow-y: auto; color: #2C3E2F; }

.info-section { margin-bottom: 20px; }
.info-section h3 { margin-top: 0; color: #3A5A40; border-bottom: 2px solid #D4E0D4; padding-bottom: 5px; }

.weather-day-details { border-bottom: 1px solid #D4E0D4; padding: 0; margin-bottom: 0; }
.weather-day-summary { display: grid; grid-template-columns: 85px 135px 1fr; align-items: center; padding: 4px 10px; gap: 10px; cursor: pointer; list-style: none; transition: background-color 0.2s; border-bottom: 1px solid #E8EDE3; }
.weather-day-summary::-webkit-details-marker { display: none; }
.weather-day-summary:hover { background-color: #F0F5EB; } 
.weather-day-summary span { text-align: left; white-space: nowrap; font-size: 15px; color: #333; }

.weather-day-extra { padding: 15px 10px; background-color: #F0F5EB; border-left: 3px solid #588157; font-size: 14px; }
.extra-stats { display: flex; justify-content: space-between; margin-bottom: 15px; color: #555; font-weight: bold; flex-wrap: wrap; gap: 5px; }
.hourly-scroll { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 10px; }
.hourly-item { min-width: 60px; text-align: center; background: #FCFDFB; border: 1px solid #D4E0D4; padding: 10px 5px; border-radius: 6px; }

.footer-title { text-align: center; font-size: 10px; color: #A3B18A; margin-top: 10px; }

.route-controls { display: flex; gap: 5px; margin-bottom: 10px; flex-wrap: wrap; }
.route-controls input { flex: 1; max-width: 200px; min-width: 130px; padding: 8px; font-size: 14px; }
.route-controls button { padding: 8px 12px; font-size: 14px; }
.location-btn { background-color: #A67C52; }
.nav-app-btn { background-color: #BC6C25; }
.nav-app-btn:hover { background-color: #9C5A1D; }
.route-result-box { padding: 10px; background-color: #F0F5EB; border-radius: 6px; font-size: 14px; font-weight: bold; border-left: 4px solid #BC6C25; display: none; }

.tabs { display: flex; border-bottom: 2px solid #D4E0D4; margin-bottom: 10px; }
.tab-btn { flex: 1; padding: 10px; text-align: center; cursor: pointer; font-weight: bold; color: #777; border-bottom: 3px solid transparent; transition: all 0.3s; }
.tab-btn.active { color: #3A5A40; border-bottom: 3px solid #3A5A40; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.img-wrapper { width: 100%; border-radius: 8px; overflow: hidden; background: #F0F5EB; box-shadow: 0 1px 5px rgba(0,0,0,0.1); min-height: 200px; display: flex; justify-content: center; align-items: center; flex-direction: column; }
.img-wrapper a { display: block; width: 100%; }
.img-wrapper img { width: 100%; height: auto; display: block; transition: opacity 0.3s; cursor: pointer; }

.loading-text { color: #588157; font-weight: bold; font-size: 14px; padding: 20px; text-align: center; }
.external-links-wrapper { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.external-btn { flex: 1; display: inline-block; color: white; padding: 8px 15px; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: bold; text-align: center; min-width: 140px; }
.btn-cwa { background-color: #25425f; }
.btn-cwa:hover { background-color: #1a2e42; }

.sheet-header {
    display: none; flex-direction: column; align-items: center; padding: 10px 20px 12px 20px;
    background: #FCFDFB; border-radius: 20px 20px 0 0; cursor: pointer; border-bottom: 1px solid #D4E0D4; flex: none;
}
.sheet-handle { width: 40px; height: 5px; background: #C5D1C5; border-radius: 3px; margin-bottom: 10px; }
.sheet-summary { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.sheet-text { flex: 1; overflow: hidden; padding-right: 10px;}
.sheet-title { font-size: 18px; font-weight: bold; color: #202124; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.sheet-subtitle { font-size: 14px; color: #5F6368; font-weight: 500; }
.sheet-icon { font-size: 16px; color: #5F6368; font-weight: bold; transition: transform 0.3s; }
#info-panel.expanded .sheet-icon { transform: rotate(180deg); }

@media (max-width: 768px) {
    body { margin: 0; padding: 0; overflow: hidden; height: 100dvh; width: 100vw; }
    .desktop-only { display: none !important; }
    .mobile-only { display: block; }
    .mobile-only-inline { display: inline-block; }

    body.in-street-view .search-box,
    body.in-street-view .mobile-action-chips { display: none !important; }

    .search-box {
        position: absolute; top: 15px; left: 2%; width: 96%; z-index: 100;
        border-radius: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); padding: 8px 15px;
        flex-direction: row; flex-wrap: nowrap; justify-content: space-between; margin: 0;
        background-color: #FCFDFB; border: none; 
    }
    .search-box input[type="text"] { flex: 1; border: none; padding: 5px 10px; background: transparent; min-width: 0; font-size: 15px; color: #333; }
    .search-box input[type="text"]:focus { outline: none; }
    .search-icon-btn { background: transparent; border: none; font-size: 18px; padding: 5px; color: #3A5A40; }
    
    .user-panel { border-left: none; padding-left: 0; margin-left: 5px; flex: none; }
    .user-profile span { display: none; }
    .logout-btn { display: none; }

    .mobile-action-chips {
        position: absolute; top: 75px; left: 2%; width: 96%; z-index: 100;
        display: flex; gap: 8px; overflow-x: auto; padding: 5px 2px;
        -ms-overflow-style: none; scrollbar-width: none;
    }
    .mobile-action-chips::-webkit-scrollbar { display: none; }
    
    .chip-wrapper, .chip-btn {
        background: #FCFDFB; border: 1px solid #D4E0D4; border-radius: 20px;
        padding: 8px 14px; font-size: 13px; font-weight: 600; color: #333;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08); white-space: nowrap;
        display: flex; align-items: center; gap: 4px; cursor: pointer;
    }
    .chip-wrapper { position: relative; }
    .chip-wrapper select {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        opacity: 0; appearance: none; -webkit-appearance: none; border: none;
    }

    .main-container { flex-direction: column; height: 100dvh; width: 100vw; position: relative; gap: 0; margin: 0; }
    #map-area { width: 100% !important; height: 100dvh !important; flex: none; position: absolute; top: 0; left: 0; border-radius: 0; border: none; }
    #splitter { display: none; }
    
    #info-panel {
        position: absolute; bottom: 0; left: 0; width: 100% !important; height: 75dvh !important;
        z-index: 101; transform: translateY(calc(100% - 78px)); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
        border-radius: 20px 20px 0 0; padding: 0; display: flex !important; flex-direction: column;
        background: #FCFDFB; box-shadow: 0 -4px 20px rgba(0,0,0,0.3); overflow: visible; flex: none;
    }
    #info-panel.expanded { transform: translateY(0); }
    
    .sheet-header { display: flex !important; }
    .panel-content { padding: 20px; overflow-y: auto; flex: 1; display: block; }
    
    .weather-day-summary { grid-template-columns: 75px max-content 1fr !important; gap: 6px !important; padding: 10px 0 !important; }
    .weather-day-summary span { font-size: 13.5px !important; white-space: nowrap !important; }
    .weather-day-summary span:last-child { text-align: right; white-space: normal !important; line-height: 1.2; }
    .footer-title { display: none; }
    
    .earth-control-btn { border-radius: 50%; width: 45px; height: 45px; } 
    .overlay-controls-3d { bottom: 85px; } 
    .gm-style-pbc { align-items: flex-start !important; padding-top: 150px !important; }
}