* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary, #ffffff);
    min-height: 100vh;
    color: var(--text-primary, #1a1a1a);
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding-top: 0;
}

/* Header */
.header {
    background: var(--bg-primary, #ffffff);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border, #f0f0f0);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1600px;
    margin: 0 auto;
}

.header h1 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.125rem;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary, #737373);
    font-size: 0.875rem;
    font-weight: 400;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border, #e5e5e5);
    background: var(--bg-secondary, #ffffff);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary, #404040);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.header-btn:hover {
    background: var(--bg-tertiary, #fafafa);
    border-color: var(--border-hover, #d4d4d4);
    color: var(--text-primary, #1a1a1a);
}

.header-btn:active {
    background: var(--bg-tertiary, #f5f5f5);
}

/* Controls - floating overlay below header */
.controls {
    position: absolute;
    top: 48px;
    left: 0;
    right: 340px;
    background: transparent;
    padding: 0 0.75rem;
    border-bottom: none;
    z-index: 99;
    pointer-events: none;
}

.controls > * {
    pointer-events: auto;
}

.filter-section h3 {
    display: none;
}

.neighborhood-filter {
    display: none; /* Hidden by default, shown by JS when data has neighborhoods */
    width: calc(100% - 2.5rem);
    margin: 1rem 1.25rem 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-primary, #1a1a1a);
    cursor: pointer;
    appearance: auto;
    font-family: inherit;
}

.neighborhood-filter:hover {
    border-color: var(--border-hover, #d4d4d4);
}

.neighborhood-filter:focus {
    outline: none;
    border-color: var(--text-primary, #1a1a1a);
}

.neighborhood-filter.visible {
    display: block;
}

.sidebar-tags {
    margin: 0.5rem 1.25rem 0;
}

/* Sidebar back-to-map button (mobile only) */
.sidebar-back-btn {
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    border: none;
    background: var(--bg-tertiary, #f5f5f5);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary, #404040);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.sidebar-back-btn:hover {
    background: var(--bg-secondary, #e5e5e5);
    color: var(--text-primary, #1a1a1a);
}

.sidebar-back-btn svg {
    flex-shrink: 0;
}

/* Sidebar filter section (category + tags inside sidebar, visible on mobile) */
.sidebar-filter-section {
    display: none;
    padding: 0.75rem 1.25rem 0;
    flex-shrink: 0;
}

.sidebar-filter-section .filter-buttons {
    margin-bottom: 0;
}

.sidebar-filter-section .sidebar-tags {
    margin: 0.35rem 0 0;
}

@media (max-width: 768px) {
    .sidebar-filter-section {
        display: block;
    }
    .sidebar-back-btn {
        display: inline-flex;
    }
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0;
}

.filter-btn {
    padding: 0.35rem 0.7rem;
    border: 1px solid transparent;
    background: var(--bg-primary, #ffffff);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary, #404040);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
}

.filter-btn:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.filter-btn.active {
    background: var(--text-primary, #1a1a1a);
    color: var(--bg-primary, #ffffff);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Tag subcategory filters */
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.tag-filter-btn {
    padding: 0.2rem 0.5rem;
    border: 1px solid transparent;
    background: var(--bg-primary, #ffffff);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary, #404040);
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tag-filter-btn:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.tag-filter-btn.active {
    background: var(--text-primary, #1a1a1a);
    color: var(--bg-primary, #ffffff);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.stats {
    display: none;
}

/* Map-Sidebar Split View Container */
.map-sidebar-container {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* Map */
#map {
    flex: 1;
    min-height: 0;
    min-width: 0;
}

/* Sidebar - Desktop: persistent in-flow; Mobile: overlay */
.sidebar {
    width: 340px;
    min-width: 340px;
    background: var(--bg-primary, #ffffff);
    border-left: 1px solid var(--border, #f0f0f0);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
    z-index: 1001;
}

.sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-left: none;
}

/* Sidebar header location count display */
.sidebar-header h2::after {
    content: ' (' attr(data-count) ')';
    font-weight: 400;
    color: var(--text-tertiary, #737373);
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, #f0f0f0);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-primary, #ffffff);
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

/* Sort select in sidebar header */
.sort-select {
    flex: 1;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-secondary, #404040);
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: auto;
}

.sort-select:hover {
    border-color: var(--border-hover, #d4d4d4);
}

.sort-select:focus {
    outline: none;
    border-color: var(--text-primary, #1a1a1a);
}

/* Search input in sidebar */
.search-input {
    display: block;
    width: calc(100% - 2.5rem);
    margin: 1rem 1.25rem 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 8px;
    font-size: 1rem;
    background: transparent;
    color: var(--text-primary, #1a1a1a);
    transition: border-color 0.15s ease;
}

.search-input::placeholder {
    color: var(--text-tertiary, #a3a3a3);
}

.search-input:focus {
    outline: none;
    border-color: var(--text-primary, #1a1a1a);
    background: var(--bg-primary, #ffffff);
}

.no-results {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-tertiary, #a3a3a3);
    font-size: 0.875rem;
}

/* Collapse sidebar button */
.collapse-sidebar {
    background: var(--bg-tertiary, #f5f5f5);
    border: none;
    color: var(--text-secondary, #737373);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.collapse-sidebar:hover {
    background: var(--bg-secondary, #e5e5e5);
    color: var(--text-primary, #1a1a1a);
}

.close-sidebar {
    background: var(--bg-tertiary, #f5f5f5);
    border: none;
    color: var(--text-secondary, #737373);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.close-sidebar:hover {
    background: var(--bg-secondary, #e5e5e5);
    color: var(--text-primary, #1a1a1a);
}

.location-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Location Cards */
.location-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary, #fafafa);
    border-radius: 8px;
    border: 1px solid var(--border, #f0f0f0);
    cursor: pointer;
    transition: all 0.15s ease;
}

.location-item:hover {
    background: var(--bg-tertiary, #f5f5f5);
    border-color: var(--border-hover, #e5e5e5);
}

.location-item.active {
    border-color: var(--accent, #1a1a1a);
    box-shadow: 0 0 0 1px var(--accent, #1a1a1a);
}

.location-item.active .location-detail-expand {
    max-height: 600px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border, #e5e5e5);
    opacity: 1;
}

.location-detail-expand {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.3s ease, padding-top 0.3s ease;
}

.sidebar-detail-description {
    color: var(--text-secondary, #737373);
    font-size: 0.8125rem;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 0.625rem;
}

.sidebar-detail-address {
    color: var(--text-secondary, #737373);
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

/* Sort divider between rated and unrated groups */
.sort-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    color: var(--text-tertiary, #a3a3a3);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sort-divider::before,
.sort-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #e5e5e5);
}

.sort-divider::before {
    max-width: 1.5rem;
}

.sidebar-detail-section-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-tertiary, #a3a3a3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.625rem;
    margin-bottom: 0.375rem;
}

.sidebar-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.375rem;
}

.sidebar-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3125rem 0.5rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary, #404040);
    background: var(--bg-primary, #ffffff);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sidebar-detail-link:hover {
    border-color: var(--border-hover, #d4d4d4);
    background: var(--bg-tertiary, #f5f5f5);
    color: var(--text-primary, #1a1a1a);
}

.location-item.hidden {
    display: none;
}

.location-name {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

/* Location meta row: category badge + rating */
.location-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.location-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
    background: var(--bg-primary, #ffffff);
    color: var(--text-secondary, #404040);
}

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.location-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #404040);
}

.location-rating .stars {
    color: #f59e0b;
    letter-spacing: -1px;
}

.location-rating .rating-value {
    color: var(--text-primary, #1a1a1a);
}

.price-level {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary, #737373);
}

.sidebar-detail-hours,
.detail-hours {
    font-size: 0.75rem;
    color: var(--text-secondary, #737373);
    margin-bottom: 0.5rem;
}

/* Legacy category badge (kept for compatibility) */
.location-category {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--text-primary, #1a1a1a);
    color: var(--bg-primary, #ffffff);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.location-description {
    color: var(--text-secondary, #737373);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.location-description.no-description {
    color: var(--text-tertiary, #a3a3a3);
    font-size: 0.75rem;
    font-style: italic;
}

/* Toggle sidebar button - top-right pill */
.toggle-sidebar {
    position: fixed;
    top: 0.5rem;
    right: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 100px;
    background: var(--bg-primary, #ffffff);
    border: none;
    color: var(--text-secondary, #404040);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 101;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.toggle-sidebar.visible {
    display: inline-flex;
}

.toggle-sidebar:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.toggle-sidebar:active {
    background: var(--bg-tertiary, #f5f5f5);
}

/* Reset view button */
.reset-view-btn {
    position: absolute;
    bottom: 1.5rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border: none;
    border-radius: 20px;
    background: var(--bg-primary, #ffffff);
    color: var(--text-secondary, #404040);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.reset-view-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.reset-view-btn:hover {
    background: var(--bg-tertiary, #f5f5f5);
    color: var(--text-primary, #1a1a1a);
}

.reset-view-btn svg {
    flex-shrink: 0;
}

/* Detail Panel - Compact bottom card over map area */
.detail-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 340px;
    background: var(--bg-primary, #ffffff);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    transition: transform 0.3s ease, right 0.3s ease;
    z-index: 998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.detail-panel.open {
    transform: translateY(0);
}

.sidebar.collapsed ~ .detail-panel,
.detail-panel.sidebar-collapsed {
    right: 0;
}

/* When sidebar collapsed, header/controls extend full width */
.sidebar.collapsed ~ .controls {
    right: 0;
}

/* For header (outside app-container), use :has() selector */
body:has(.sidebar.collapsed) .city-header {
    right: 0;
}

/* Hide Google Maps built-in controls */
.gm-svpc,
.gm-bundled-control,
.gm-fullscreen-control,
.gmnoprint:not(.gm-style-cc) {
    display: none !important;
}

.gm-style-cc {
    opacity: 0.6;
}

.detail-drag-handle {
    width: 36px;
    height: 4px;
    background: var(--border, #d4d4d4);
    border-radius: 2px;
    margin: 0.5rem auto 0;
    flex-shrink: 0;
}

.detail-panel-close {
    position: absolute;
    top: 0.625rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary, #f5f5f5);
    color: var(--text-secondary, #737373);
    font-size: 1rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 1;
}

.detail-panel.open .detail-panel-close {
    display: flex;
}

.detail-panel-close:hover {
    background: var(--bg-secondary, #e5e5e5);
    color: var(--text-primary, #1a1a1a);
}

.detail-panel-body {
    padding: 0.625rem 1.25rem 0.75rem;
    overflow: hidden;
    flex: 1;
}

.detail-panel-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.375rem;
    padding-right: 2rem;
    line-height: 1.3;
}

.detail-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.detail-panel-body .detail-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
    background: var(--bg-secondary, #fafafa);
    color: var(--text-secondary, #404040);
}

.detail-panel-body .detail-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
}

.detail-panel-body .detail-rating .stars {
    color: #f59e0b;
}

.detail-panel-body .detail-address {
    color: var(--text-secondary, #737373);
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3125rem;
}

.detail-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.1875rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary, #404040);
    background: var(--bg-secondary, #fafafa);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.detail-quick-links a:hover {
    border-color: var(--border-hover, #d4d4d4);
    background: var(--bg-tertiary, #f5f5f5);
    color: var(--text-primary, #1a1a1a);
}

.detail-reservation {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: var(--bg-secondary, #fafafa);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 8px;
    font-size: 0.8125rem;
}

.reservation-label {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    font-size: 0.8125rem;
}

.reservation-note {
    color: var(--text-secondary, #404040);
    font-size: 0.75rem;
    line-height: 1.3;
}

.reservation-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.625rem;
    background: var(--text-primary, #1a1a1a);
    color: #fff !important;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s ease;
    width: fit-content;
    margin-top: 0.125rem;
}

.reservation-book-btn:hover {
    opacity: 0.85;
}

.detail-expand-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.detail-panel.expanded .detail-expand-section {
    max-height: 40vh;
    overflow-y: auto;
    margin-top: 0.625rem;
}

.detail-panel-body .detail-description {
    color: var(--text-secondary, #737373);
    font-size: 0.8125rem;
    font-style: italic;
    line-height: 1.5;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border, #e5e5e5);
}

.detail-expand-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.25rem;
    border: none;
    background: none;
    color: var(--text-tertiary, #a3a3a3);
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
    letter-spacing: 0.02em;
}

.detail-expand-toggle:hover {
    color: var(--text-secondary, #737373);
}

.detail-expand-toggle .chevron {
    transition: transform 0.3s ease;
    font-size: 0.5rem;
}

.detail-panel.expanded .detail-expand-toggle .chevron {
    transform: rotate(180deg);
}

.detail-panel.expanded .detail-expand-toggle .toggle-text::after {
    content: 'Less';
}

.detail-expand-toggle .toggle-text::after {
    content: 'More';
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border, transparent);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border, #f0f0f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary, #ffffff);
}

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.01em;
}

.modal-close {
    background: var(--bg-tertiary, #f5f5f5);
    border: none;
    color: var(--text-secondary, #737373);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--bg-secondary, #e5e5e5);
    color: var(--text-primary, #1a1a1a);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body p {
    margin-bottom: 1rem;
    color: var(--text-secondary, #404040);
    font-size: 0.9375rem;
}

.modal-body textarea {
    width: 100%;
    min-height: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.8125rem;
    resize: vertical;
    margin-bottom: 1rem;
    background: var(--bg-secondary, #fafafa);
    color: var(--text-primary, #1a1a1a);
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--accent, #1a1a1a);
    background: var(--bg-primary, #ffffff);
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #1a1a1a);
    font-size: 0.9375rem;
}

.setting-group select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 6px;
    font-size: 0.9375rem;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-primary, #1a1a1a);
    cursor: pointer;
}

.setting-group select:focus {
    outline: none;
    border-color: var(--accent, #1a1a1a);
}

.setting-group input[type="range"] {
    width: 100%;
    padding: 0;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border, #e5e5e5);
    border-radius: 3px;
    cursor: pointer;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--text-primary, #1a1a1a);
    border-radius: 50%;
    cursor: pointer;
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--text-primary, #1a1a1a);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.setting-group span {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-primary {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--accent, #1a1a1a);
    color: #ffffff;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-secondary, #404040);
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: var(--bg-tertiary, #fafafa);
    border-color: var(--border-hover, #d4d4d4);
}

.btn-secondary:active {
    background: var(--bg-tertiary, #f5f5f5);
}

/* Responsive design */
@media (max-width: 768px) {
    /* On mobile, header/controls extend full width */
    .city-header {
        right: 0;
    }

    .controls {
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        padding: 0.4rem 0.75rem;
        z-index: 99;
        pointer-events: none;
    }

    .controls .tag-filters {
        display: none !important;
    }

    .sidebar {
        position: fixed;
        right: -100%;
        top: 0;
        width: 100%;
        min-width: 100%;
        height: 100vh;
        border-left: none;
        box-shadow: none;
        transition: right 0.25s ease;
    }

    .sidebar.open {
        right: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    }

    .sidebar.collapsed {
        right: -100%;
        width: 100%;
        min-width: 100%;
    }

    .collapse-sidebar {
        display: none;
    }

    .toggle-sidebar {
        display: inline-flex;
    }

    .toggle-sidebar.visible {
        display: inline-flex;
    }

    .detail-panel {
        position: fixed;
        left: 0;
        right: 0;
        max-height: 55vh;
    }

    .sidebar.collapsed ~ .detail-panel,
    .detail-panel.sidebar-collapsed {
        right: 0;
    }

    .detail-panel-body {
        padding: 0.5rem 1rem 0.625rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .detail-address {
        white-space: normal !important;
    }

    .filter-section {
        position: relative;
    }

    .filter-buttons {
        gap: 0.3rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        position: relative;
    }

    .filter-buttons::after {
        content: '';
        position: sticky;
        right: 0;
        flex-shrink: 0;
        width: 2rem;
        height: 100%;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .filter-buttons.scrolled-end::after {
        opacity: 0;
    }

    .filter-buttons::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .tag-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-top: 0.25rem;
    }

    .sidebar-filter-section .tag-filters {
        margin: 0.35rem 0 0;
        padding-bottom: 0.25rem;
    }

    .tag-filters::-webkit-scrollbar {
        display: none;
    }

    .tag-filter-btn {
        flex-shrink: 0;
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .header {
        padding: 1rem 1.25rem;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .toggle-sidebar {
        top: 0.5rem;
        right: 0.75rem;
        width: auto;
        height: auto;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 10px;
    }
}

/* Scrollbar styling */
.location-list::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.detail-panel-body::-webkit-scrollbar {
    width: 8px;
}

.location-list::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.detail-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.location-list::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.detail-panel-body::-webkit-scrollbar-thumb {
    background: var(--border, #e5e5e5);
    border-radius: 4px;
}

.location-list::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.detail-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover, #d4d4d4);
}

/* Google Maps Info Window styling overrides */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 8px !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
}

/* Review link hover effects */
.location-item a[href]:hover {
    background: var(--bg-tertiary, #f5f5f5) !important;
    border-color: var(--border-hover, #d4d4d4) !important;
}

/* Review input groups */
.review-input-group {
    margin-bottom: 1.5rem;
}

.review-input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #1a1a1a);
    font-size: 0.9375rem;
}

.review-input-group input[type="text"],
.review-input-group input[type="number"] {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 6px;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-primary, #1a1a1a);
}

.review-input-group input[type="text"]:focus,
.review-input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent, #1a1a1a);
}

.review-input-group input[type="number"] {
    width: 150px;
}

/* Add review button */
.add-review-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary, #404040);
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-review-btn:hover {
    background: var(--bg-tertiary, #fafafa);
    border-color: var(--border-hover, #1a1a1a);
    color: var(--text-primary, #1a1a1a);
}

/* Michelin badges */
.michelin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.125rem 0.4375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.michelin-stars {
    background: #C41E3A15;
    color: #C41E3A;
    border: 1px solid #C41E3A30;
}

.michelin-bib {
    background: #C41E3A10;
    color: #C41E3A;
    border: 1px solid #C41E3A25;
}

.michelin-green {
    background: #16a34a10;
    color: #16a34a;
    border: 1px solid #16a34a25;
}

/* Badge row (Michelin + 50 Best on their own line) */
.location-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

/* Make badge links look like badges, not underlined links */
a.michelin-badge,
a.fiftybest-badge {
    text-decoration: none;
    cursor: pointer;
}
a.michelin-badge:hover,
a.fiftybest-badge:hover {
    opacity: 0.85;
}

/* World's 50 Best badge */
.fiftybest-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.125rem 0.4375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    background: #D4AF3715;
    color: #B8860B;
    border: 1px solid #D4AF3730;
}

/* Must-order dishes */
.must-order {
    font-size: 0.6875rem;
    color: var(--text-primary, #333);
    margin-top: 0.375rem;
}

.must-order-label {
    font-weight: 600;
    color: var(--text-secondary, #666);
}

/* Action CTA buttons (Book & Do) */
.sidebar-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.sidebar-action-btn {
    font-weight: 600;
    border-width: 1.5px;
}

.detail-action-btn {
    font-weight: 600;
    border: 1.5px solid;
    border-radius: 6px;
}

/* Tag chips */
.location-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.375rem;
}

.location-tag {
    display: inline-block;
    padding: 0.125rem 0.4375rem;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: var(--bg-tertiary, #f5f5f5);
    color: var(--text-tertiary, #737373);
    white-space: nowrap;
}

.location-tag.clickable-tag {
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.location-tag.clickable-tag:hover {
    background: var(--text-tertiary, #737373);
    color: var(--bg-primary, #ffffff);
}

/* Insider tip */
.insider-tip {
    font-size: 0.8125rem;
    color: var(--text-secondary, #737373);
    line-height: 1.5;
    margin-bottom: 0.625rem;
    padding-left: 0.625rem;
    border-left: 2px solid var(--border-hover, #d4d4d4);
}
