

:root {
    /* World-Class Palette (Stripe-inspired) */
    --accent-color: #635bff;
    --accent-hover: #4b45c6;
    --accent-subtle: #e3e8ee;

    --bg-color: #f7f9fc;
    --surface-color: #ffffff;
    --surface-hover: #fcfdfe;
    --sidebar-bg: rgba(255, 255, 255, 0.92);

    --text-primary: #0a2540;
    --text-secondary: #425466;
    --text-tertiary: #8792a2;
    --text-on-accent: #ffffff;

    --border-color: #e6ebf1;
    --divider-color: #f2f5f7;

    /* Refined Shadows for Depth */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 5px -1px rgba(50, 50, 93, 0.25), 0 1px 3px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 12px -2px rgba(50, 50, 93, 0.25), 0 3px 7px -3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 13px 27px -5px rgba(50, 50, 93, 0.25), 0 8px 16px -8px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
    --shadow-focus: 0 0 0 4px rgba(99, 91, 255, 0.15);
    --shadow-input: inset 0 1px 2px rgba(10, 37, 64, 0.06); /* Subtle inner shadow */

    --shadow-sidebar: 16px 0 40px -10px rgba(0, 0, 0, 0.08);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Animations */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;

    --z-map: 1;
    --z-sidebar: 1000;
    --z-popup: 1100;
    --z-loader: 9999;
}

[data-theme="dark"] {
    --bg-color: #1a1f36;
    --surface-color: #262c49;
    --surface-hover: #2f365f;
    --sidebar-bg: rgba(26, 31, 54, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #a3acb9;
    --text-tertiary: #697386;
    --border-color: #3c4257;
    --divider-color: #3c4257;
    --shadow-sidebar: 16px 0 40px -10px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

/* === Layout === */

/* Sidebar (Desktop) */
#sidebar {
    width: 440px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
    box-shadow: var(--shadow-sidebar);
    position: relative;
    transition: transform var(--duration-normal) var(--ease-out);
    backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255,255,255,0.4);
}

/* Sidebar Header (Sticky) */
.sidebar-header {
    padding: 32px 32px 16px;
    background: linear-gradient(to bottom, var(--surface-color), transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--duration-normal);
    z-index: 10;
}

/* Scrolled state for header (can be toggled via JS if needed, but linear gradient covers it mostly) */
.sidebar-content.scrolled + .sidebar-header {
    border-color: var(--divider-color);
}

.sidebar-content {
    padding: 16px 32px 32px;
    overflow-y: auto;
    flex: 1;
}

/* Elegant Scrollbar */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}
.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
}
.sidebar-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0,0,0,0.15);
}

/* Map Container */
#map {
    flex-grow: 1;
    height: 100%;
    z-index: var(--z-map);
    background-color: #f0f2f5;
}

/* === Components === */

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 24px;
}

#search-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 52px;
    border: 1px solid var(--border-color); /* Added border for definition */
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--surface-color);
    box-shadow: var(--shadow-input);
    transition: all var(--duration-fast) var(--ease-out);
    outline: none;
    font-family: inherit;
}

#search-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

#search-input:hover {
    border-color: #cfd7df;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03), inset 0 1px 2px rgba(0,0,0,0.02);
}

#search-input:focus {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-focus);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color var(--duration-fast) var(--ease-out);
}

#search-input:focus + .search-icon {
    color: var(--accent-color);
}

/* Filter Chips */
#category-filters h4 {
    margin: 0 0 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 700;
}

.filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Tighter gap */
    margin-bottom: 12px;
}

.filter-chip {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 14px; /* Refined padding */
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-xs);
}

.filter-chip:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
    border-color: #cfd7df;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-chip.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-on-accent);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

.filter-chip.active:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Favorites Filter Special Style */
.filter-chip.favorites-filter {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(99, 91, 255, 0.05);
}
.filter-chip.favorites-filter.active {
    background: var(--accent-color);
    color: white;
}
.filter-chip.favorites-filter svg {
    margin-right: 4px;
}

.filters-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Action Buttons (Surprise Me, etc) */
.action-btn {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    transition: all var(--duration-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm);
}

.action-btn:hover {
    background: rgba(99, 91, 255, 0.05);
    transform: translateY(-1px);
}

/* Clear Button */
#clear-filters {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    transition: all var(--duration-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-sm);
}

#clear-filters:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.03);
}

/* Search Results */
#search-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 8px;
}

.search-result-item {
    background: var(--surface-color);
    padding: 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid transparent; /* Prepare for border transition */
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

/* Result Thumbnail */
.result-thumbnail {
    width: 72px; /* Slightly smaller for elegance */
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f2f5;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Hover Effect: Lift */
.search-result-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 91, 255, 0.1); /* Subtle accent border on hover */
}

.search-result-item:hover .result-thumbnail img {
    transform: scale(1.08);
}

.result-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 15px; /* Refined */
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Favorite Button (Sidebar) */
.favorite-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #cbd5e1; /* Inactive color */
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-right: -8px; /* Pull right slightly */
}
.favorite-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.favorite-btn.active {
    color: #ef4444;
    fill: #ef4444;
}
.favorite-btn.active svg {
    fill: currentColor;
}

.result-meta {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

/* Badges */
.info-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.price-badge {
    background: #e0f2f1;
    color: #00695c;
    border: 1px solid #b2dfdb;
}
.time-badge {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.result-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

/* Sidebar Local Tip */
.result-tip {
    font-size: 11px;
    color: #946c00;
    margin-top: 6px;
    display: flex;
    gap: 6px;
    align-items: flex-start;
    line-height: 1.4;
    background: #fffdf5;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #fae8a5;
}
.result-tip svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #dcb028;
}

.no-results {
    color: var(--text-tertiary);
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
    background: rgba(255,255,255,0.5);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

/* === Leaflet Customization === */

/* Popups */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl) !important;
    padding: 0;
    overflow: hidden;
    background: var(--surface-color);
    border: 1px solid rgba(0,0,0,0.05); /* Subtle border definition */
    animation: popupScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
    transform-origin: bottom center;
}

.leaflet-popup-tip {
    background: var(--surface-color);
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.05); /* Match border */
    animation: popupScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.leaflet-popup-content {
    margin: 0;
    width: 320px !important; /* Wider for desktop */
    font-family: 'Inter', sans-serif;
}

/* Remove default close button to style our own, or style it heavily */
.leaflet-container a.leaflet-popup-close-button {
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    font-size: 20px;
    font-weight: 400;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    top: 12px;
    right: 12px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}

.leaflet-container a.leaflet-popup-close-button:hover {
    background: rgba(0,0,0,0.5);
    color: white;
    transform: scale(1.1);
}

/* Custom Popup Internal */
.custom-popup .popup-image {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f0f2f5;
}

/* Popup Favorite Button */
.popup-fav-btn {
    position: absolute;
    top: 12px;
    left: 12px; /* Close button is on right */
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
    z-index: 10;
}
.popup-fav-btn:hover {
    transform: scale(1.1);
    color: #ef4444;
}
.popup-fav-btn.active {
    color: #ef4444;
}
.popup-fav-btn.active svg {
    fill: currentColor;
}

/* Popup Share Button */
.popup-share-btn {
    position: absolute;
    top: 12px;
    left: 56px; /* 12 + 36 + 8 */
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
    z-index: 10;
}
.popup-share-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.custom-popup .popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Popup Local Tip */
.popup-tip {
    background: #fffdf5;
    border: 1px solid #fae8a5;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.4;
    color: #946c00;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.popup-tip svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #dcb028;
}

.custom-popup .popup-info {
    padding: 24px;
}

.popup-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.custom-popup .popup-info h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.custom-popup .popup-info p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.custom-popup .popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--divider-color);
    padding-top: 16px;
}

.rating-badge {
    background: #fffdf5;
    color: #b78a0b;
    border: 1px solid #fae8a5;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.visit-link {
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(99, 91, 255, 0.05);
    border-radius: var(--radius-sm);
}

.visit-link:hover {
    background: rgba(99, 91, 255, 0.1);
    color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Zoom Controls (Floating Bubbles) */
.leaflet-bar {
    border: none !important;
    box-shadow: none !important;
}

.leaflet-control-zoom-in, .leaflet-control-zoom-out {
    background-color: var(--surface-color) !important;
    color: var(--text-secondary) !important;
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-weight: 500;
    font-size: 20px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border-radius: 12px !important; /* Squircle */
    margin-bottom: 12px !important;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaflet-control-zoom-in:hover, .leaflet-control-zoom-out:hover {
    background-color: var(--surface-hover) !important;
    color: var(--accent-color) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color) !important;
}

/* Custom Marker Styling (DivIcons) */
.custom-marker-icon {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--surface-color), #f4f6f8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.05);
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid white;
    animation: markerPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.marker-pin::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid white;
    filter: drop-shadow(0 2px 1px rgba(0,0,0,0.1));
}

/* Active Marker Pulse */
.marker-pin.active {
    transform: scale(1.15) translateY(-6px);
    box-shadow: 0 15px 30px rgba(99, 91, 255, 0.3), 0 0 0 4px rgba(99, 91, 255, 0.1);
    z-index: 1000;
    border-color: var(--accent-color);
}
.marker-pin.active::after {
    border-top-color: var(--accent-color);
}

.marker-pin svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
    transition: color 0.2s;
}

.marker-pin:hover {
    transform: scale(1.15) translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
    z-index: 999;
}

/* Category Colors for Markers */
.marker-pin.historical { color: #5e72e4; }
.marker-pin.historical svg { color: #5e72e4; }

.marker-pin.natural { color: #2dce89; }
.marker-pin.natural svg { color: #2dce89; }

.marker-pin.cultural { color: #fb6340; }
.marker-pin.cultural svg { color: #fb6340; }

.marker-pin.coastal { color: #11cdef; }
.marker-pin.coastal svg { color: #11cdef; }

.marker-pin.gastronomy { color: #f5365c; }
.marker-pin.gastronomy svg { color: #f5365c; }

.marker-pin.adventure { color: #ff9f43; }
.marker-pin.adventure svg { color: #ff9f43; }

/* Cluster Styling */
/* Default override */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
    background-color: rgba(99, 91, 255, 0.15) !important;
}

.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
    background-color: var(--accent-color) !important;
    color: white !important;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 10px rgba(99, 91, 255, 0.3);
    width: 40px;
    height: 40px;
    margin-left: 0;
    margin-top: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform 0.2s;
    border: 2px solid white; /* Polished look */
}

.marker-cluster div:hover {
    transform: scale(1.1);
}


/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    z-index: var(--z-loader);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(99, 91, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 0.8s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Mobile Optimization (Bottom Sheet) === */

#mobile-handle-container {
    display: none;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    #sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        /* Start with 90vh to give room for map at top when expanded */
        max-height: 85vh;
        border-top-left-radius: var(--radius-xl);
        border-top-right-radius: var(--radius-xl);
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
        z-index: 2000;
        border: none;

        /* We'll handle this dynamically via JS or a precise calc. */
        /* Initial state is collapsed, showing only header */
        transform: translateY(calc(100% - 150px));
        transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }

    /* Ensure the sidebar covers content nicely */
    #sidebar::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 0;
        right: 0;
        height: 1px;
        background: transparent;
        z-index: 100;
        pointer-events: none;
    }

    /* Make header sticky inside the sidebar */
    .sidebar-header {
        position: sticky;
        top: 0;
        background: transparent;
        padding: 0 20px 10px;
    }

    /* Handle states */
    #sidebar.expanded {
        transform: translateY(0);
    }

    /* Add a half-expanded state if we want, but simple expand/collapse is cleaner */

    #sidebar.dragging {
        transition: none;
    }

    #mobile-handle-container {
        display: flex;
        justify-content: center;
        padding: 12px 0 8px;
        cursor: grab;
        touch-action: none;
        width: 100%;
        background: transparent;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    #mobile-handle {
        width: 40px;
        height: 4px;
        background: #d1d9e2;
        border-radius: 100px;
        transition: all 0.2s;
    }

    #mobile-handle-container:active #mobile-handle {
        background: #cfd7df;
        width: 48px;
    }

    .sidebar-content {
        padding: 0 20px 20px;
        /* Calculate height to allow scrolling within the sheet */
        height: 60vh;
        padding-bottom: 80px;
        overflow-y: auto;
    }

    /* Tweaks for mobile readability */
    #search-input {
        font-size: 16px; /* Avoid iOS zoom */
        height: 48px;
    }

    .filter-chip {
        padding: 8px 12px;
        font-size: 13px;
    }

    .search-result-item {
        padding: 12px;
        gap: 12px;
    }

    .result-thumbnail {
        width: 64px;
        height: 64px;
    }

    .result-title {
        font-size: 15px;
    }

    /* Move map attribution out of the way */
    .leaflet-control-attribution {
        margin-bottom: 150px !important;
        background: rgba(255, 255, 255, 0.7) !important;
    }

    /* Adjust map controls on mobile */
    .leaflet-bottom.leaflet-right {
        bottom: 170px; /* Higher up */
        right: 16px;
    }

    .leaflet-control-zoom {
        margin-bottom: 0;
    }

    .leaflet-control-zoom-in, .leaflet-control-zoom-out {
         width: 48px !important;
         height: 48px !important;
         line-height: 48px !important;
    }
}

/* Animations & Polished Improvements */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    opacity: 0; /* Start hidden */
    animation: slideUpFade 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes popupScaleIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes markerPopIn {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Active States for Sleek Native Feel */
.search-result-item:active, .filter-chip:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

/* === New Content Features === */

/* Tag Chips */
.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag-chip {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Duration Badge */
.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: rgba(0,0,0,0.03);
    padding: 2px 6px;
    border-radius: 4px;
}

.duration-badge svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* Must Visit Badge */
.must-visit-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ffd700, #fdb931);
    color: #5c4d1f;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Category Icons in Filter */
.category-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.8;
}

/* Marker Highlight (Map) */
.marker-pin.highlighted {
    transform: scale(1.3) translateY(-10px) !important;
    z-index: 10000 !important;
    box-shadow: 0 20px 40px rgba(99, 91, 255, 0.4), 0 0 0 4px rgba(99, 91, 255, 0.2);
    border-color: var(--accent-color);
}
.marker-pin.highlighted::after {
    border-top-color: var(--accent-color);
}

/* Collections */
#collections-container {
    margin-bottom: 24px;
    margin-top: -8px; /* Pull closer to header */
}

.collections-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px; /* For scrollbar space or shadow */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    cursor: grab;
}
.collections-scroll::-webkit-scrollbar {
    display: none;
}

.collection-chip {
    flex: 0 0 auto;
    width: 130px;
    height: 76px; /* Slightly taller */
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); /* More rounded */
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--shadow-sm); /* Default shadow */
    position: relative;
    overflow: hidden;
}

.collection-chip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 91, 255, 0.2);
}

[data-theme="dark"] .collection-chip:hover {
    border-color: var(--text-tertiary);
}

.collection-chip.active {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.25);
    background: linear-gradient(135deg, var(--surface-hover), rgba(99, 91, 255, 0.05));
}
.collection-chip.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
}

.collection-chip.active .collection-name {
    color: var(--accent-color);
    font-weight: 700;
}

.collection-icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.collection-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
    transition: color 0.2s;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
}

.modal-overlay.visible .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}
.modal-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-primary);
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--divider-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tip-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f7f9fc;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: all 0.2s;
}
.tip-card:hover {
    background: white;
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tip-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tip-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.tip-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.phrase-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin-top: 8px;
    font-size: 13px;
}
.phrase-grid span:nth-child(odd) {
    font-weight: 600;
    color: var(--accent-color);
}
.phrase-grid span.trans {
    color: var(--text-secondary);
}

/* === Map Floating Controls === */

.map-floating-btn {
    position: absolute;
    top: 12px;
    right: 70px; /* Positioned to the left of zoom controls */
    background-color: var(--surface-color);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000; /* Above map */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-floating-btn:hover {
    background-color: var(--surface-hover);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

/* Quick Filter Bar */
#quick-filter-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(calc(-50% + 220px)); /* Center relative to map area (sidebar 440px) */
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

[data-theme="dark"] #quick-filter-bar {
    background: rgba(38, 44, 73, 0.9);
}

.quick-filter-chip {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-filter-chip:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.quick-filter-chip.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .map-floating-btn {
        top: auto;
        bottom: 240px; /* Above zoom controls which are bottom: 170px */
        right: 16px;
    }

    #quick-filter-bar {
        top: 70px; /* Below mobile header area */
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        max-width: 95%;
        overflow-x: auto;
    }
}

/* User Location Marker */
.user-location-marker {
    width: 16px;
    height: 16px;
    background-color: var(--accent-color);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 91, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(99, 91, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 91, 255, 0);
    }
}

/* === Detail Panel Styles === */
.sidebar-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 200; /* Above regular content */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateX(0);
    /* No shadow needed as it's full width inside sidebar */
}

.sidebar-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
}

.panel-header-sticky {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    z-index: 10;
    transition: background-color 0.2s;
    /* We start transparent so hero image shows through, but handle scroll via JS to add background */
    /* Actually, for simplicity, let's just make it a gradient or glass */
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
    color: white;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.panel-actions {
    display: flex;
    gap: 12px;
}

.action-icon-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-icon-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.action-icon-btn.active {
    background: white;
    color: #ef4444;
}

.panel-hero {
    width: 100%;
    height: 300px;
    margin-top: -72px; /* Pull up behind header */
    position: relative;
    flex-shrink: 0;
    background: #e6ebf1;
}

.panel-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    pointer-events: none;
}

.panel-content {
    background: var(--surface-color);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    margin-top: -24px;
    position: relative;
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.detail-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#detail-title {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-primary);
}

#detail-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.local-tip-box {
    background: #fffdf5;
    border: 1px solid #fae8a5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.tip-label {
    font-size: 12px;
    font-weight: 700;
    color: #946c00;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

#detail-tip {
    font-size: 14px;
    color: #745200;
    line-height: 1.5;
    margin: 0;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.website-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

.website-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 91, 255, 0.4);
}

@media (max-width: 768px) {
    .panel-hero {
        height: 250px;
    }
    .panel-content {
        padding: 24px 20px;
    }
    #detail-title {
        font-size: 24px;
    }
}

/* Price Filter */
.price-filter-container {
    margin-bottom: 24px;
}

.price-filter-container h4 {
    margin: 0 0 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 700;
}

.price-buttons {
    display: flex;
    gap: 8px;
}

.price-btn {
    flex: 1;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 0;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.price-btn:hover {
    background: var(--surface-hover);
    border-color: #cfd7df;
    color: var(--text-primary);
}

.price-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* === My Trip Modal Styles === */
#my-trip-list {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* Let items handle padding */
}

.trip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--divider-color);
    transition: background-color 0.2s;
    cursor: pointer;
}

.trip-item:hover {
    background-color: var(--surface-hover);
}

.trip-item:last-child {
    border-bottom: none;
}

.trip-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #e6ebf1;
}

.trip-item-info {
    flex: 1;
}

.trip-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.trip-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.trip-remove-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.trip-remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.empty-state {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--divider-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-color);
}

.trip-summary {
    display: flex;
    flex-direction: column;
}

.trip-summary span {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 700;
}

.trip-summary strong {
    font-size: 18px;
    color: var(--text-primary);
}

.trip-actions {
    display: flex;
    gap: 12px;
}

/* Directions Button */
.directions-btn {
    background: var(--accent-color); /* Same as primary */
    flex: 1;
}

.secondary-btn {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    flex: 1;
}

.secondary-btn:hover {
    background: var(--surface-hover);
    border-color: #cfd7df;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

/* Weather Widget */
.weather-widget {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #0d47a1;
}

.weather-icon {
    font-size: 24px;
    background: rgba(255,255,255,0.5);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-info h4 {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 700;
}

.weather-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

/* Routes Modal Specifics */
.large-modal {
    max-width: 800px;
    height: 80vh;
}

.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.route-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.route-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cfd7df;
}

.route-card-image {
    width: 100%;
    height: 160px;
    background: #e6ebf1;
    position: relative;
}

.route-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.route-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.route-info h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.route-info p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.route-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
}

.route-count {
    background: rgba(99, 91, 255, 0.1);
    color: var(--accent-color);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Audio Guide Button */
.audio-guide-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 12px;
}

.audio-guide-btn:hover {
    background: var(--surface-hover);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.audio-guide-btn.playing {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    animation: pulse-audio 1.5s infinite;
}

@keyframes pulse-audio {
    0% { box-shadow: 0 0 0 0 rgba(99, 91, 255, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(99, 91, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 91, 255, 0); }
}

/* Accessibility Badge */
.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: #f0f2f5;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
    width: fit-content;
}

.access-badge svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* === New Enhancements: Content Depth & UX === */

/* Onboarding Toast */
.onboarding-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); /* Start hidden */
    background: var(--surface-color);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    max-width: 90%;
    width: 400px;
}

.onboarding-toast.visible {
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 24px;
    background: rgba(99, 91, 255, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-content h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.toast-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    margin-left: auto;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.toast-close:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

/* Fun Fact Box */
.fun-fact-box {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.fun-fact-box::before {
    content: '💡';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 80px;
    opacity: 0.1;
    transform: rotate(15deg);
}

.fun-fact-header {
    font-size: 11px;
    font-weight: 700;
    color: #7b1fa2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fun-fact-content {
    font-size: 14px;
    line-height: 1.5;
    color: #4a148c;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Best Time Visualizer */
.best-time-container {
    margin-bottom: 24px;
}

.best-time-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.month-viz {
    display: flex;
    gap: 4px;
    height: 24px; /* Taller bars */
    align-items: flex-end; /* Align bottom */
}

.month-bar {
    flex: 1;
    background: #e6ebf1;
    border-radius: 2px;
    height: 40%; /* Default low height */
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.month-bar:hover::after {
    content: attr(data-month);
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.month-bar.active {
    background: var(--accent-color);
    height: 80%; /* Active height */
}

.month-bar.peak {
    background: #f5365c; /* Peak season color */
    height: 100%;
}

/* Nearby Gems Section */
.nearby-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--text-primary);
}

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Responsive */
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px; /* Scrollbar space */
}

.nearby-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    min-width: 120px; /* Ensure minimum width */
}

.nearby-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cfd7df;
}

.nearby-thumb {
    height: 80px;
    width: 100%;
    background: #f0f2f5;
    position: relative;
}

.nearby-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nearby-info {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nearby-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nearby-dist {
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .onboarding-toast {
        bottom: 20px;
        width: calc(100% - 32px);
    }

    .month-bar {
        height: 60% !important; /* Force simpler height on mobile */
    }
    .month-bar.active {
        height: 90% !important;
    }
}

/* === New Style Additions === */

/* Visited Filter */
.filter-chip.visited-filter {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(0,0,0,0.03);
}
.filter-chip.visited-filter.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}
.filter-chip.visited-filter svg {
    margin-right: 4px;
}

/* Visited Indicator (List) */
.visited-indicator {
    color: #2dce89; /* Success green */
    display: flex;
    align-items: center;
    background: rgba(45, 206, 137, 0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    justify-content: center;
    flex-shrink: 0;
}

/* Photospot Box */
.photospot-box {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    color: #e65100;
}

.photospot-box::before {
    content: '📸';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 80px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.photospot-header {
    font-size: 11px;
    font-weight: 700;
    color: #e65100;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.photospot-content {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Transit Badge */
.transit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    background: white;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 8px;
    width: fit-content;
    box-shadow: var(--shadow-xs);
}

.transit-badge span {
    font-size: 14px;
}

/* === Interactive Phrases === */
.phrase-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.phrase-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.audio-play-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.audio-play-btn:hover {
    transform: scale(1.1);
    background: var(--accent-hover);
}

.audio-play-btn svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
    stroke: none;
}

.audio-play-btn svg path, .audio-play-btn svg polygon {
    fill: currentColor;
    stroke: none;
}

/* === Empty State Action === */
.empty-state-action {
    margin-top: 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

.empty-state-action:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 91, 255, 0.4);
}

/* === Pulse Animation === */
.pulse-animation {
    animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Override for new interactive grid */
.phrase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns of cards */
    gap: 12px;
}

@media (max-width: 480px) {
    .phrase-grid {
        grid-template-columns: 1fr;
    }
}

/* Sort Controls */
.filter-controls {
    margin-bottom: 24px;
    display: flex;
    justify-content: flex-end;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-container label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 28px 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1.4;
}

.select-wrapper select:hover {
    border-color: #cfd7df;
    background: var(--surface-hover);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
}

.select-wrapper svg {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-tertiary);
    width: 14px;
    height: 14px;
}

/* Hidden Gem Marker Style */
.marker-pin.hidden-gem {
    border-color: #ffd700; /* Gold border */
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4), 0 0 0 1px rgba(255, 215, 0, 0.2);
}

.marker-pin.hidden-gem::before {
    content: '✦';
    position: absolute;
    top: -12px;
    right: -8px;
    background: #ffd700;
    color: #b45309;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 5;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Staggered Animation Utilities */
.stagger-delay-1 { animation-delay: 0.1s !important; }
.stagger-delay-2 { animation-delay: 0.15s !important; }
.stagger-delay-3 { animation-delay: 0.2s !important; }
.stagger-delay-4 { animation-delay: 0.25s !important; }
.stagger-delay-5 { animation-delay: 0.3s !important; }

.dynamic-extra-section {
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* Ensure these animate sequentially */
.dynamic-extra-section:nth-of-type(1) { animation-delay: 0.1s; }
.dynamic-extra-section:nth-of-type(2) { animation-delay: 0.2s; }
.dynamic-extra-section:nth-of-type(3) { animation-delay: 0.3s; }
.dynamic-extra-section:nth-of-type(4) { animation-delay: 0.4s; }

/* Print Styles */
@media print {
    #sidebar, #map, #near-me-btn, #quick-filter-bar, .modal-close, .trip-actions, .trip-remove-btn {
        display: none !important;
    }
    .modal-overlay {
        position: absolute;
        top: 0;
        left: 0;
        background: white;
        opacity: 1;
        display: block;
        padding: 0;
        z-index: 9999;
        height: auto;
    }
    .modal-content {
        transform: none;
        box-shadow: none;
        max-width: 100%;
        max-height: none;
        border: none;
        width: 100%;
        position: static;
    }
    .modal-body {
        overflow: visible;
    }
    body {
        overflow: visible;
        background: white;
        height: auto;
    }
    .trip-item {
        break-inside: avoid;
        border-bottom: 1px solid #ccc;
    }
}

/* Search Clear Button */
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}
.search-clear:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-primary);
}
.search-clear.hidden {
    display: none;
}

/* === New Enriched Content Styles === */

/* Route Line Animation */
.route-line-anim {
    stroke-dasharray: 10, 10;
    animation: dash 1s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -20;
    }
}

/* Crowd Widget */
.crowd-box {
    margin-bottom: 24px;
    background: var(--surface-color);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.crowd-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.crowd-viz {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
}

.crowd-bar {
    flex: 1;
    background: #e3e8ee;
    border-radius: 2px 2px 0 0;
    transition: height 0.5s ease-out;
}

.crowd-bar:hover {
    background: var(--accent-color);
}

.crowd-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-tertiary);
}

/* Insta Widget */
.insta-box {
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #fff0f5, #f8f9fa);
    border-radius: var(--radius-md);
}

.insta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.insta-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.insta-bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0; /* Animate via JS or CSS */
    transition: width 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Getting There Box */
.getting-there-box {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    color: #0d47a1;
}

.getting-there-header {
    font-size: 11px;
    font-weight: 700;
    color: #1565c0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.getting-there-content {
    font-size: 14px;
    line-height: 1.5;
}

/* Notes Section */
.notes-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.notes-textarea {
    width: 100%;
    height: 80px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 8px;
    background: var(--bg-color);
    transition: all 0.2s;
}

.notes-textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: var(--shadow-focus);
}

.save-note-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-note-btn:hover {
    background: var(--accent-hover);
}

.save-note-btn.saved {
    background: #2dce89 !important;
}

/* Trip Budget */
.trip-budget-display {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* === Badges UI === */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.badge-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.badge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #fdb931);
}

.badge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cfd7df;
}

.badge-icon {
    font-size: 32px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.badge-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.badge-level {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
    display: block;
}

.badge-info p {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* === Postcard UI === */
.postcard-content {
    max-width: 600px;
    background: transparent;
    box-shadow: none;
    border: none;
}

.postcard-frame {
    background: white;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transform: rotate(-2deg);
    transition: transform 0.3s;
    border-radius: 2px;
}

.postcard-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.postcard-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    border: 1px solid #eee;
    margin-bottom: 16px;
}

.postcard-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.postcard-overlay h1 {
    font-family: 'Brush Script MT', cursive;
    font-size: 24px;
    margin: 0;
    opacity: 0.9;
}

.postcard-overlay h2 {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.postcard-text {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.postcard-text p {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    width: 70%;
    margin: 0;
    line-height: 1.6;
}

.postcard-stamp {
    width: 60px;
    height: 70px;
    border: 2px dashed #e6ebf1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transform: rotate(5deg);
    opacity: 0.5;
}

/* === Quests UI === */
.quests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.quest-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.quest-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cfd7df;
}

.quest-card.completed {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fffdf5, #ffffff);
}

.quest-card.completed::after {
    content: '🏆';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
}

.quest-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quest-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: #f0f2f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quest-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.quest-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.quest-progress-container {
    width: 100%;
    height: 8px;
    background: #e6ebf1;
    border-radius: 4px;
    overflow: hidden;
}

.quest-progress-bar {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.quest-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.quest-btn {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.quest-btn.start {
    background: var(--accent-color);
    color: white;
}

.quest-btn.start:hover {
    background: var(--accent-hover);
}

.quest-btn.active {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.quest-btn.active:hover {
    background: rgba(99, 91, 255, 0.05);
}

/* Active Quest HUD on Map */
#active-quest-hud {
    position: absolute;
    top: 80px; /* Below search/filter area */
    left: 50%;
    transform: translateX(calc(-50% + 220px)); /* Center relative to map */
    background: white;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--accent-color);
    animation: slideUpFade 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#active-quest-hud .quest-status {
    display: flex;
    flex-direction: column;
}

#active-quest-hud h5 {
    margin: 0;
    font-size: 11px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#active-quest-hud span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

#active-quest-hud .close-quest {
    background: #f0f2f5;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
}

#active-quest-hud .close-quest:hover {
    background: #e6ebf1;
    color: #ef4444;
}

@media (max-width: 768px) {
    #active-quest-hud {
        top: 140px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        justify-content: space-between;
    }
}

.day-selector:focus {
    border-color: var(--accent-color) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
}

/* Legend Box */
.legend-box {
    background: #fdf6e3;
    border: 1px solid #d4c4a8;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 2px 2px 0 rgba(212, 196, 168, 0.3);
}

.legend-box::before {
    content: '📜';
    position: absolute;
    top: -12px;
    left: 12px;
    font-size: 24px;
    background: #fdf6e3;
    padding: 0 4px;
    line-height: 1;
}

.legend-header {
    font-family: 'Georgia', serif;
    font-weight: 700;
    color: #5c4b37;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.legend-content {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 14px;
    line-height: 1.6;
    color: #5c4b37;
}
/* Map Legend */
.info.legend {
    background: var(--surface-color);
    padding: 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    margin-right: 12px;
    border: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    width: 140px;
    backdrop-filter: blur(8px);
}

.info.legend h4 {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .info.legend {
        display: none; /* Hide on mobile to save space */
    }
}
/* Vibe Matcher Styles */
#vibe-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

#vibe-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

#vibe-quiz-body .vibe-option-btn {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 14px;
}

#vibe-quiz-body .vibe-option-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Enrichment Styles */
.dynamic-extra-section.gastronomy-box {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    color: #c53030;
}

.dynamic-extra-section.secret-box {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    color: #2f855a;
}

.enrichment-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.enrichment-content {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

/* Featured Site Card */
.featured-site-card {
    margin-bottom: 24px;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.featured-site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: white;
    color: var(--accent-color);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

/* === New Enhancements Styles === */

/* Local Lingo */
.local-lingo-box {
    margin-bottom: 24px;
}
.lingo-item {
    transition: background-color 0.2s;
}
.lingo-item:hover {
    background-color: var(--surface-hover);
}
.lingo-item:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}
.lingo-item:last-child {
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Vibe Matcher Top Match Card */
.top-match-card {
    background: linear-gradient(135deg, var(--surface-color), #f8f9fa);
    border: 2px solid var(--accent-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 10px 30px rgba(99, 91, 255, 0.2);
    position: relative;
    overflow: hidden;
    animation: popupScaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.top-match-card::before {
    content: '🏆';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 80px;
    opacity: 0.1;
    transform: rotate(15deg);
}

.top-match-header {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.top-match-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.top-match-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* Dynamic Greeting */
.dynamic-greeting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease-out;
}

.greeting-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.greeting-suggestion {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(99, 91, 255, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.greeting-suggestion:hover {
    background: var(--accent-color);
    color: white;
}

/* My Trip Show Route Toggle */
.trip-actions-extended {
    display: flex;
    width: 100%;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--divider-color);
}

.show-route-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.toggle-switch {
    width: 36px;
    height: 20px;
    background: #e6ebf1;
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input[type="checkbox"]:checked + .toggle-switch {
    background: var(--accent-color);
}

input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(16px);
}

/* Did You Know Tooltip */
.leaflet-tooltip.fun-fact-tooltip {
    background: var(--surface-color);
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    width: 200px;
    white-space: normal;
    animation: pulse-soft 2s infinite;
}

.leaflet-tooltip.fun-fact-tooltip::before {
    border-top-color: var(--accent-color);
}

.tooltip-header {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === ENRICHED CONTENT STYLES === */

/* Live Status Badge */
.live-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.busy { background-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.2); }
.status-dot.moderate { background-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,0.2); }
.status-dot.quiet { background-color: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,0.2); }

/* Vibe Chips */
.vibe-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.vibe-chip {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(99, 91, 255, 0.08);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.vibe-chip:hover {
    background: rgba(99, 91, 255, 0.15);
    transform: translateY(-1px);
}

/* Know Before You Go (KBYG) Grid */
.kbyg-box {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.kbyg-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kbyg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.kbyg-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kbyg-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 700;
}

.kbyg-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* A Local's Perfect Day Timeline */
.timeline-box {
    background: linear-gradient(to bottom, #fdfbfb, #f4f6f8);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.timeline-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-container {
    position: relative;
    padding-left: 24px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 7px;
    width: 2px;
    height: 100%;
    background: var(--border-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 16px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 16px;
    height: 16px;
    background: var(--surface-color);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
    z-index: 2;
}

.timeline-time {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 2px;
    display: inline-block;
    background: rgba(99, 91, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.timeline-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    background: var(--surface-color);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    margin-top: 4px;
}

[data-theme="dark"] .timeline-box {
    background: linear-gradient(to bottom, #262c49, #1a1f36);
}
