/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --c-magenta: #C939A3;
    --c-teal: #51A2B6;
    --c-purple: #8B5FA8;
    --c-text: #1a1a1a;
    --c-glass: rgba(255, 255, 255, 0.95);
    --c-border: rgba(0, 0, 0, 0.12);
    --c-border-light: rgba(0, 0, 0, 0.08);
    --c-hover: rgba(0, 0, 0, 0.08);
    --c-input-bg: rgba(0, 0, 0, 0.05);
    --c-magenta-light: rgba(201, 57, 163, 0.15);
    --c-teal-light: rgba(81, 162, 182, 0.15);
    --grad-magenta-teal: linear-gradient(135deg, var(--c-magenta) 0%, var(--c-teal) 100%);
    --grad-rainbow: linear-gradient(90deg, var(--c-teal) 0%, var(--c-purple) 50%, var(--c-magenta) 100%);
    --grad-rainbow-rev: linear-gradient(135deg, var(--c-magenta) 0%, var(--c-purple) 50%, var(--c-teal) 100%);
    --grad-teal-magenta: linear-gradient(90deg, var(--c-teal), var(--c-magenta));
    --radius-card: 12px;
    --radius-btn: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ── Landing & About Pages ── */

.landing-page,
.about-page {
    min-height: 100vh;
    background: #f5f5f5;
    color: #1a1a1a;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.landing-header-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
}

.landing-logo-mark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--grad-magenta-teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
}

.landing-logo-text {
    text-decoration: none;
    color: #1a1a1a;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.landing-link {
    font-size: 14px;
    color: rgba(0,0,0,0.7);
    text-decoration: none;
}

.landing-link:hover {
    color: #1a1a1a;
}

.landing-link-secondary {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.02);
}

.landing-main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 32px 20px 40px;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 36px;
}

.landing-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.landing-eyebrow {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
}

.landing-title {
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
}

.landing-subtitle {
    font-size: 15px;
    color: rgba(0,0,0,0.7);
    max-width: 36rem;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.landing-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: var(--grad-magenta-teal);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(201,57,163,0.35);
}

.landing-btn-primary:hover {
    filter: brightness(1.05);
}

.landing-btn-ghost {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.6);
    font-size: 13px;
}

.landing-supported {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.landing-supported-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.5);
}

.landing-supported-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.landing-chip {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.9);
}

.landing-chip-active {
    border-color: rgba(81,162,182,0.7);
    background: rgba(81,162,182,0.08);
    color: #3a8a9a;
    font-weight: 600;
}

.landing-chip-soon {
    color: rgba(0,0,0,0.6);
}

.landing-hero-card {
    background: var(--c-glass);
    border-radius: 16px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.landing-hero-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.landing-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: rgba(0,0,0,0.72);
}

.landing-steps li strong {
    display: block;
    margin-bottom: 2px;
}

.landing-feedback {
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.landing-feedback-inner {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 3fr);
    gap: 20px;
    align-items: flex-start;
}

.landing-feedback-copy h2 {
    font-size: 20px;
    margin-bottom: 6px;
}

.landing-feedback-copy p {
    font-size: 14px;
    color: rgba(0,0,0,0.7);
}

.landing-feedback-form {
    background: var(--c-glass);
    border-radius: 14px;
    padding: 14px 16px 16px;
    border: 1px solid rgba(0,0,0,0.08);
}

.landing-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.landing-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.landing-field label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0,0,0,0.65);
}

.landing-field input,
.landing-field textarea {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.14);
    background: rgba(0,0,0,0.02);
    font-size: 13px;
    resize: vertical;
}

.landing-field textarea {
    min-height: 90px;
}

.landing-feedback-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.landing-feedback-status {
    font-size: 12px;
    color: rgba(0,0,0,0.55);
}

.landing-feedback-status-success {
    color: #0f766e;
}

.landing-feedback-status-error {
    color: #b91c1c;
}

@media (max-width: 840px) {
    .landing-hero {
        grid-template-columns: minmax(0, 1fr);
    }
    .landing-feedback-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .landing-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .landing-main {
        padding-top: 20px;
    }
}

.about-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px 40px;
}

.about-section {
    margin-bottom: 22px;
}

.about-hero h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.about-hero p {
    font-size: 15px;
    color: rgba(0,0,0,0.7);
}

.about-section h2 {
    font-size: 18px;
    margin-bottom: 6px;
}

.about-section p {
    font-size: 14px;
    color: rgba(0,0,0,0.78);
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: rgba(0,0,0,0.8);
}

.about-list li strong {
    display: block;
    margin-bottom: 2px;
}

.about-contact a {
    color: var(--c-teal);
    text-decoration: none;
}

.about-contact a:hover {
    text-decoration: underline;
}


.app-page {
    display: none;
}

.app-page.active {
    display: block;
}

#page-analysis.active {
    display: flex;
    flex-direction: column;
}

/* Full-Screen Map */
#map {
    position: absolute;
    top: 80px; /* Account for top panel */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 80px);
    z-index: 0;
}

/* Top Horizontal Panel */
#top-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--c-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0 32px;
    transition: background 0.3s ease, border-color 0.3s ease;
}


.top-panel-content {
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 48px;
    padding-bottom: 12px;
}

.top-panel-header h1 {
    font-size: 32px;
    font-weight: 700;
    background: var(--grad-magenta-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
    white-space: nowrap;
}

.top-panel-subtitle {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    transition: color 0.3s ease;
}


.top-panel-controls {
    display: flex;
    gap: 24px;
    align-items: center;
    flex: 1;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.control-group label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}


.control-group .filter-select {
    padding: 8px 12px;
    font-size: 13px;
}


/* Theme Toggle removed — light theme only */

/* Export Report button */
#export-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #1a1a1a;
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
}

#export-btn:hover {
    background: #333;
    border-color: #333;
}

#export-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}


/* Left Sidebar (Filters Only) */
#sidebar {
    position: fixed;
    left: 0;
    top: 80px; /* Below top panel */
    bottom: 0;
    width: 380px;
    background: var(--c-glass);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 24px 0;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    transform: translateX(0);
}



#sidebar::-webkit-scrollbar,
#ai-description-panel::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track,
#ai-description-panel::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb,
#ai-description-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.filter-section {
    padding: 16px 20px 0;
    margin-bottom: 24px;
}

/* Collapsible filter category sections */
.filter-group-section {
    margin-bottom: 4px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.filter-group-section-header {
    list-style: none;
    cursor: pointer;
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
    background: rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    outline: none;
    transition: background 0.15s;
}

.filter-group-section-header::-webkit-details-marker { display: none; }
.filter-group-section-header::marker { display: none; }

.filter-group-section-header::before {
    content: '▶';
    font-size: 7px;
    opacity: 0.5;
    transition: transform 0.18s;
    flex-shrink: 0;
}

.filter-group-section[open] > .filter-group-section-header::before {
    transform: rotate(90deg);
}

.filter-group-section-header:hover {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.8);
}

.filter-group-section-body {
    padding: 10px 12px 4px;
}

/* Sub-scores collapsible inside Scores section */
.sub-scores-details {
    margin-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 6px;
}
.sub-scores-summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0,0,0,0.45);
    padding: 4px 0;
    list-style: none;
    user-select: none;
}
.sub-scores-summary::-webkit-details-marker { display: none; }
.sub-scores-summary::marker { display: none; }
.sub-scores-summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    font-size: 10px;
    transition: transform 0.15s ease;
}
.sub-scores-details[open] > .sub-scores-summary::before {
    transform: rotate(90deg);
}
.sub-scores-body {
    padding-left: 8px;
}

.filters-collapsible {
    max-height: none;
    overflow: visible;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.filters-collapsible.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.filter-group {
    margin-bottom: 10px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.filter-label-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.filter-label-row .selected-value-indicator {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #D32F2F;
    font-size: 13px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.filter-label-row .selected-value-indicator:empty {
    display: none;
}

.filter-info-icon {
    display: inline-block;
    margin-left: 6px;
    font-size: 14px;
    opacity: 0.5;
    cursor: help;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.filter-info-icon:hover {
    opacity: 1;
    transform: scale(1.15);
}

.filter-tooltip {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    max-width: 320px;
    font-size: 13px;
    line-height: 1.5;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-tooltip .tooltip-title {
    font-weight: 600;
    color: var(--c-magenta);
    margin-bottom: 6px;
    font-size: 14px;
}

.filter-tooltip .tooltip-description {
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 8px;
}

.filter-tooltip .tooltip-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
}

.filter-tooltip .tooltip-meta-item {
    display: flex;
    gap: 6px;
}

.filter-tooltip .tooltip-meta-label {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.5);
}

.value-separator {
    margin: 0 6px;
    color: #D32F2F;
    font-weight: 300;
    font-size: 14px;
}



.filter-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(201, 57, 163, 0.4);
}

.filter-select:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--c-magenta);
    box-shadow: 0 0 0 3px rgba(201, 57, 163, 0.2);
}

.filter-select option {
    background: #ffffff;
    color: #1a1a1a;
}



/* Histogram */
.histogram-container {
    height: 40px;
    width: 100%;
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    padding: 6px 4px 2px;
    transition: background 0.3s ease;
    overflow: visible;
}

/* Viewport stats span */
.histogram-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    margin: 2px 0 1px;
    gap: 6px;
}

.viewport-stats {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.45);
    text-align: right;
    min-height: 14px;
    letter-spacing: 0.3px;
}

/* Range Slider */
.range-slider {
    margin: 6px 0 4px;
}

.noUi-target {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 4px;
    box-shadow: none;
    height: 4px;
}

.noUi-connect {
    background: var(--grad-rainbow);
}

.noUi-handle,
.noUi-horizontal .noUi-handle {
    background: #ffffff;
    border: 1px solid var(--c-magenta);
    border-radius: 50% !important;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    right: -2px !important;
    top: -1px !important;
    width: 4px !important;
    height: 4px !important;
    cursor: grab;
    transition: all 0.15s ease;
}

.noUi-handle:hover {
    box-shadow: 0 3px 12px rgba(201, 57, 163, 0.5);
    transform: scale(1.1);
}

.noUi-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

.range-values {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 4px;
}

.range-input {
    flex: 1;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    text-align: center;
    transition: all 0.2s ease;
}

.range-input:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(201, 57, 163, 0.3);
}

.range-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--c-magenta);
    box-shadow: 0 0 0 2px rgba(201, 57, 163, 0.2);
}

/* Remove spinner buttons from number inputs */
.range-input::-webkit-inner-spin-button,
.range-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.range-input {
    -moz-appearance: textfield;
}



/* Buttons */
button {
    padding: 7px 14px;
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: none;
}

button:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(201, 57, 163, 0.5);
    transform: none;
}

button:active {
    transform: none;
}


.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .analysis-map-card .analysis-map-actions .btn-secondary {
    color: #1a1a1a;
}

.sidebar-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Reset button removed from sidebar
#reset-filters {
    width: 100%;
}
*/

/* AI Analysis Button (in top panel) */
.btn-analysis {
    align-self: center;
    padding: 7px 14px;
    background: rgba(81, 162, 182, 0.08);
    border: 1px solid rgba(81, 162, 182, 0.3);
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-analysis:hover:not(:disabled) {
    background: rgba(81, 162, 182, 0.15);
    border-color: rgba(81, 162, 182, 0.5);
    transform: none;
}

.btn-analysis:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}


.btn-ai-analysis {
    align-self: center;
    padding: 7px 14px;
    background: rgba(201, 57, 163, 0.08);
    border: 1px solid rgba(201, 57, 163, 0.3);
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ai-analysis:hover:not(:disabled) {
    background: rgba(201, 57, 163, 0.15);
    border-color: rgba(201, 57, 163, 0.5);
}

.btn-ai-analysis:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-ai-analysis.loading {
    pointer-events: none;
    opacity: 0.6;
}


.city-selection-wrapper {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.city-selection-wrapper h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    color: rgba(0, 0, 0, 0.75);
}

.city-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.city-actions button {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 8px;
    background: rgba(81, 162, 182, 0.08);
    border: 1px solid rgba(81, 162, 182, 0.25);
    color: #1a1a1a;
}

.city-actions button:hover {
    background: rgba(81, 162, 182, 0.15);
    border-color: rgba(81, 162, 182, 0.4);
}

.city-selection-list {
    max-height: 220px;
    overflow-y: auto;
}

.city-group {
    margin-bottom: 10px;
}

.city-group summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.75);
    margin-bottom: 6px;
    list-style: none;
    display: flex;
    align-items: center;
}

.city-group summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 4px;
    font-size: 10px;
    transition: transform 0.15s ease;
}

.city-group[open] > summary::before {
    transform: rotate(90deg);
}

.city-group summary::-webkit-details-marker {
    display: none;
}

.district-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.district-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--c-magenta);
}

.district-count {
    font-weight: 400;
    color: rgba(0, 0, 0, 0.45);
    font-size: 11px;
}

.city-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 5px;
    color: rgba(0, 0, 0, 0.75);
}

.city-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.city-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(201, 57, 163, 0.1);
    border: 1px solid rgba(201, 57, 163, 0.25);
    border-radius: 999px;
    font-size: 11px;
    color: #1a1a1a;
}

.city-chip button {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font-size: 12px;
    box-shadow: none;
    line-height: 1;
}

#page-analysis {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    z-index: 2;
    overflow-y: auto;
}

.analysis-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 12px;
    flex: 1;
    align-items: start;
    transition: grid-template-columns 0.3s ease;
}

.analysis-layout.ai-open {
    grid-template-columns: 5fr 4fr 3fr;
}

/* Col 1: Map + Survey stacked */
.analysis-main-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analysis-map-card,
.analysis-survey-card,
.analysis-col,
.analysis-action-row {
    background: var(--c-glass);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-card);
    padding: 14px;
}

.analysis-map-card {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.analysis-survey-card {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 50vh;
}

.analysis-survey-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
}

.analysis-survey-header h3 {
    margin: 0;
    font-size: 15px;
    white-space: nowrap;
}

/* Col 2: Action row + Scores + People + POIs */
.analysis-data-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.analysis-action-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 10px;
}

.analysis-biz-type-ctrl {
    flex: 1;
    min-width: 0;
}

.analysis-biz-type-ctrl label {
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 2px;
}

.analysis-biz-type-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 4px 0;
}


.analysis-col {
    overflow-y: auto;
}

/* Col 3: AI description (hidden until generated) */
.analysis-ai-col {
    display: none;
    background: var(--c-glass);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 14px;
    overflow-y: auto;
    flex-direction: column;
}

.analysis-ai-col.active {
    display: flex;
}

.ai-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ai-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.ai-col-header .close-btn {
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.ai-col-header .close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
}

/* Prominent AI button inside analysis action row */
.btn-ai-analysis-prominent {
    padding: 10px 16px;
    flex-shrink: 0;
    background: var(--grad-rainbow-rev);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(201, 57, 163, 0.35);
}

.btn-ai-analysis-prominent:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201, 57, 163, 0.5);
    filter: brightness(1.1);
}

.btn-ai-analysis-prominent:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-ai-analysis-prominent.loading {
    pointer-events: none;
    opacity: 0.6;
}

.analysis-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.analysis-card-header h3 {
    white-space: nowrap;
}

.analysis-location-meta {
    flex: 1;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    align-items: baseline;
}

#analysis-map {
    width: 100%;
    height: 38vh;
    min-height: 350px;
    border-radius: 10px;
    overflow: hidden;
    flex: none;
}

.hex-id-label {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.45);
    font-family: monospace;
}

.hex-coords {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.75);
}

.gmaps-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 11px;
}

.gmaps-link:hover {
    text-decoration: underline;
}

.hex-geocode {
    font-size: 10.5px;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 3px;
    font-style: italic;
}

.analysis-parameters-placeholder {
    margin-top: 8px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
    color: rgba(0, 0, 0, 0.75);
    font-size: 13px;
}

/* Analysis loading indicator */
.analysis-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 13px;
}
.analysis-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--c-teal);
    border-radius: 50%;
    animation: analysis-spin 0.8s linear infinite;
}
@keyframes analysis-spin {
    to { transform: rotate(360deg); }
}

.poi-type-group {
    margin-bottom: 2px;
}
.poi-type-group > summary {
    cursor: pointer;
    list-style: none;
    padding: 6px 0;
}
.poi-type-group > summary::-webkit-details-marker { display: none; }
.poi-type-group > summary::before {
    content: '▸ ';
    font-size: 11px;
    color: rgba(0,0,0,0.4);
}
.poi-type-group[open] > summary::before {
    content: '▾ ';
}
.poi-type-group.poi-highlight > summary {
    color: var(--c-teal);
    font-weight: 600;
}
.poi-type-count {
    font-weight: 400;
    color: rgba(0,0,0,0.45);
    font-size: 12px;
}

.poi-category-row:hover {
    background: rgba(81,162,182,0.08);
}
.poi-category-selected {
    background: rgba(81,162,182,0.12);
    font-weight: 600;
    color: var(--c-teal);
}
.poi-category-selected .metric-val {
    color: var(--c-teal);
}

.btn-transport-small {
    font-size: 11px;
    padding: 5px 10px;
    margin-top: 12px;
}
.btn-transport-active {
    background: var(--c-teal);
    color: #fff;
    border-color: var(--c-teal);
}

.analysis-controls {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.analysis-control-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analysis-control-row label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.analysis-layer-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.analysis-layer-controls label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.75);
}

.analysis-layer-controls input[type="checkbox"] {
    accent-color: var(--c-teal);
}

.analysis-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.analysis-bar-row {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 10px;
}

.analysis-bar-label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.75);
}

.analysis-bar-track {
    height: 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

.analysis-bar-fill {
    height: 100%;
    background: var(--grad-rainbow);
    border-radius: 999px;
}

.analysis-bar-value {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.75);
    min-width: 56px;
    text-align: right;
}

.analysis-baseline-text {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.65);
}

/* ─── Analysis panel compact metrics ─── */
.analysis-panel-card {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.analysis-panel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 10px;
}

.analysis-panel-topbar h3 {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
}

.analysis-biz-ctrl {
    flex: 1;
    min-width: 180px;
}

.analysis-biz-ctrl .filter-select {
    width: 100%;
    max-width: none;
}

.analysis-topbar-controls {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.analysis-ctrl-sm {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.analysis-ctrl-sm label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0,0,0,0.45);
}

.filter-select-sm {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.2);
    color: #333;
    max-width: 160px;
}

.analysis-check-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(0,0,0,0.6);
    cursor: pointer;
    padding-bottom: 2px;
}

.analysis-check-label input[type="checkbox"] {
    accent-color: var(--c-teal);
}

#analysis-parameters {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.analysis-section {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.07);
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.45);
    margin-bottom: 8px;
}

.baseline-note {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 10px;
    color: rgba(0,0,0,0.45);
}

.metrics-compact-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Two-column layout for census / transport / POI sections */
.metrics-compact-grid.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
}

/* Row with percentile mini-bar (for scores) */
.metric-row {
    display: grid;
    grid-template-columns: 1fr 44px 56px;
    align-items: center;
    gap: 6px;
}

/* Row with just value (for census/transport/poi) */
.metric-row-simple {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 1px 0;
}

.metric-name {
    font-size: 14px;
    color: rgba(0,0,0,0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 3px;
}

.metric-val {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0,0,0,0.9);
    text-align: right;
    white-space: nowrap;
}

.metric-unit {
    font-size: 9px;
    font-weight: 400;
    color: rgba(0,0,0,0.4);
}

/* Total Score collapsible — triangle left of the row */
.total-score-details {
    margin: 0;
}

.total-score-details > summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 14px 1fr 44px 56px;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    user-select: none;
    outline: none;
}

.total-score-details > summary::-webkit-details-marker { display: none; }
.total-score-details > summary::marker { display: none; }

.total-score-details > summary::before {
    content: '▶';
    font-size: 8px;
    color: rgba(0,0,0,0.35);
    transition: transform 0.18s;
    display: inline-block;
    text-align: center;
}

.total-score-details[open] > summary::before {
    transform: rotate(90deg);
}

.total-score-details > summary:hover::before {
    color: rgba(0,0,0,0.7);
}

.score-details-body {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 20px;
}

/* gradient bar fill specifically for scores section */
.scores-fill {
    background: var(--grad-rainbow);
}

/* Favicon logo used as info icon inside metric rows */
.metric-info-logo {
    width: 12px;
    height: 12px;
    opacity: 0.35;
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: middle;
    border-radius: 2px;
    filter: brightness(0);
}

.metric-info-logo:hover {
    opacity: 0.8;
}

/* Small info icon inside analysis metric rows */
.analysis-metric-info {
    font-size: 10px;
    opacity: 0.5;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

.analysis-metric-info:hover {
    opacity: 0.9;
}

.metric-bar {
    height: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(81,162,182,0.7), rgb(81,162,182));
    border-radius: 2px;
    transition: width 0.3s;
}

.scores-section .metric-bar-fill {
    background: var(--grad-rainbow);
}

.analysis-empty {
    font-size: 11px;
    color: rgba(0,0,0,0.35);
    font-style: italic;
    padding: 4px 0;
}





/* AI Description Panel (overlay) */
#ai-description-panel {
    position: fixed;
    right: 20px;
    top: 96px;
    width: 380px;
    max-height: calc(100vh - 116px);
    background: var(--c-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    z-index: 998;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateX(440px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    color: #1a1a1a;
}

#ai-description-panel.active {
    transform: translateX(0);
}

.ai-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    background: var(--c-glass);
    backdrop-filter: blur(20px);
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.ai-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.ai-panel-icon {
    font-size: 18px;
}

#ai-panel-coords {
    color: #555;
    font-weight: 500;
}

.ai-panel-header .close-btn {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.ai-panel-header .close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.btn-google-maps {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-google-maps:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.25);
}

#ai-panel-content {
    padding: 20px;
}

#ai-panel-content .info-placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.close-btn {
    position: relative;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    color: rgba(0, 0, 0, 0.7);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}



.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
    transform: none;
}



.info-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.info-label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.info-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--c-magenta);
}

.info-section strong {
    display: block;
    font-size: 14px;
    color: var(--c-magenta);
    margin-bottom: 8px;
}

.info-placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    transition: color 0.3s ease;
}

/* Analysis Results */
.analysis-result {
    font-size: 14px;
    line-height: 1.6;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.analysis-summary {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(201, 57, 163, 0.1);
    border-left: 3px solid var(--c-magenta);
    border-radius: 6px;
    font-size: 14px;
}

.analysis-section {
    margin-top: 16px;
}

.analysis-section ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.analysis-section li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: #333;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.analysis-section li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--c-teal);
    font-size: 18px;
}

/* Loading Overlay */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: var(--c-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 32px 48px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    color: #1a1a1a;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .analysis-layout,
    .analysis-layout.ai-open {
        grid-template-columns: 1fr;
    }

    .analysis-survey-card {
        max-height: none;
    }

    #analysis-map {
        height: 30vh;
        min-height: 200px;
    }

    #top-panel {
        padding: 0 16px;
    }

    .top-panel-content {
        gap: 16px;
    }

    .top-panel-header h1 {
        font-size: 20px;
    }

    .top-panel-subtitle {
        display: none;
    }

    .control-group {
        min-width: 150px;
    }

    #sidebar {
        width: 320px;
    }

    .color-legend {
        left: 332px;
    }

    #ai-description-panel {
        width: calc(100% - 40px);
        max-width: 380px;
        top: 100px; /* Below top panel */
    }
}

@media (max-width: 480px) {
    #top-panel {
        height: auto;
        padding: 12px;
    }

    .top-panel-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 0;
    }

    .top-panel-controls {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .control-group {
        width: 100%;
        min-width: 0;
    }

    #map {
        top: 160px; /* Taller panel on mobile */
        height: calc(100vh - 160px);
    }

    #filters-toggle-btn {
        display: none;
    }

    #sidebar {
        width: 100%;
        padding: 0 0 20px 0;
        top: 160px;
    }

    .color-legend {
        left: 12px;
    }

    #ai-description-panel {
        top: 170px;
        width: calc(100% - 20px);
        max-width: none;
    }
}

/* Map Loading Overlay */
.map-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.25);
    z-index: 600;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}
.map-loading-overlay.active {
    display: flex;
}
.map-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--c-teal);
    border-radius: 50%;
    animation: map-spin 0.8s linear infinite;
}
@keyframes map-spin {
    to { transform: rotate(360deg); }
}
.map-loading-text {
    color: #333;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(255,255,255,0.5);
}

/* Viewport Loading Indicator */
.viewport-indicator {
    display: none;
    position: absolute;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 500;
    font-size: 14px;
    pointer-events: none;
}

.viewport-coverage-badge {
    background: rgba(81, 162, 182, 0.12);
    color: #3a8a9a;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Error Messages */
.info-error {
    padding: 12px;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #dc3545;
    font-size: 13px;
}

.info-error strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.info-error p {
    margin: 0;
    line-height: 1.4;
    color: #555;
}

/* Welcome Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(18px) saturate(1.2);
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 48px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    color: rgba(0, 0, 0, 0.5);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #000000;
    transform: rotate(90deg);
}

.modal-content h2 {
    font-size: 32px;
    font-weight: 700;
    background: var(--grad-magenta-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.modal-content > p {
    font-size: 16px;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 32px;
    line-height: 1.6;
}

.modal-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.feature {
    text-align: center;
}

.feature-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.feature h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.feature p {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.4;
}

.btn-primary {
    width: 100%;
    padding: 12px 20px;
    background: var(--grad-magenta-teal);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(201, 57, 163, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(201, 57, 163, 0.4);
}

.modal-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-checkbox input {
    margin-right: 8px;
    cursor: pointer;
}

.btn-text {
    background: none;
    border: none;
    color: var(--c-teal);
    font-size: 13px;
    padding: 8px 0;
    cursor: pointer;
    text-decoration: underline;
    box-shadow: none;
    width: 100%;
    text-align: center;
}

.btn-text:hover {
    color: var(--c-magenta);
    transform: none;
}

.filter-group.hidden {
    display: none;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MapLibre Controls - Transparent Background */
.maplibregl-ctrl-group,
.mapboxgl-ctrl-group {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.maplibregl-ctrl-group button,
.mapboxgl-ctrl-group button {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.maplibregl-ctrl-group button:hover,
.mapboxgl-ctrl-group button:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.maplibregl-ctrl-group button:last-child,
.mapboxgl-ctrl-group button:last-child {
    border-bottom: none !important;
}

.maplibregl-ctrl-icon,
.mapboxgl-ctrl-icon {
    filter: invert(0) brightness(0.3);
    transition: filter 0.3s ease;
}

/* Multi-Select Dropdown (Landuse Filter) */
.landuse-filter-wrapper {
    margin-bottom: 16px;
}

.landuse-filter {
    margin-bottom: 0 !important;
}

.multi-select-dropdown {
    position: relative;
    width: 100%;
}

.multi-select-selected {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.multi-select-selected:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(201, 57, 163, 0.5);
}

.multi-select-selected::after {
    content: '▼';
    font-size: 10px;
    opacity: 0.6;
}

.multi-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.multi-select-actions {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.multi-select-actions button {
    flex: 1;
    padding: 6px 12px;
    background: rgba(201, 57, 163, 0.1);
    border: 1px solid rgba(201, 57, 163, 0.3);
    border-radius: 4px;
    color: #1a1a1a;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.multi-select-actions button:hover {
    background: rgba(201, 57, 163, 0.2);
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #1a1a1a;
    transition: background 0.15s ease;
}

.multi-select-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.multi-select-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--c-magenta);
    cursor: pointer;
}

/* POI Filters Section */
.poi-biz-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.poi-biz-label {
    font-size: 12px;
    white-space: nowrap;
    color: rgba(0,0,0,0.6);
}
.poi-biz-select-wrap select {
    flex: 1;
    min-width: 0;
}
.poi-filters-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.poi-filters-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-magenta);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poi-filter {
    background: rgba(201, 57, 163, 0.05);
    border-left: 3px solid var(--c-magenta);
    padding-left: 12px !important;
    margin-left: 0 !important;
}



/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
}

.sidebar-title {
    display: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(0, 0, 0, 0.6);
}

/* Reset button removed from sidebar
#reset-filters {
    display: none;
}
*/



.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header .close-btn {
    display: none;
}

.btn-reset {
    padding: 7px 14px;
    background: rgba(201, 57, 163, 0.1);
    border: 1px solid rgba(201, 57, 163, 0.4);
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background: rgba(201, 57, 163, 0.2);
    border-color: rgba(201, 57, 163, 0.7);
}



/* Business Welcome Modal & Survey */
.modal-business-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.3;
}

.modal-business-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.feature.step {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 170px;
}

.feature.step h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-magenta);
    margin: 8px 0 4px;
}

.feature.step p {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
    line-height: 1.3;
}

.feature.step .feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Survey Step Styles */
.survey-header {
    margin-bottom: 18px;
}

.survey-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.survey-progress-fill {
    height: 100%;
    background: var(--grad-teal-magenta);
    border-radius: 2px;
    transition: width 0.35s ease;
    min-width: 4px;
}

.survey-step-info {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.4);
    text-align: right;
}

.survey-question-text {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.35;
}

.survey-disclaimer {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 14px;
    line-height: 1.4;
    padding: 8px 12px;
    background: rgba(201,57,163,0.06);
    border-left: 2px solid var(--c-magenta);
    border-radius: 0 6px 6px 0;
}

.survey-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.survey-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 8px;
    background: rgba(0, 0, 0, 0.02);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    min-height: 80px;
}

.survey-option:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(201,57,163,0.5);
}

.survey-option.selected {
    background: rgba(201,57,163,0.08);
    border-color: var(--c-magenta);
    box-shadow: 0 0 0 2px rgba(201,57,163,0.2);
}

.survey-option-icon { font-size: 22px; line-height: 1; }
.survey-option-label { font-size: 12px; font-weight: 500; line-height: 1.3; }

.survey-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.btn-survey-nav {
    padding: 8px 14px;
    border: 1px solid rgba(201,57,163,0.3);
    border-radius: 8px;
    background: rgba(201,57,163,0.06);
    color: rgba(0, 0, 0, 0.7);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-survey-nav:hover {
    background: rgba(201,57,163,0.15);
    border-color: rgba(201,57,163,0.6);
    color: #1a1a1a;
}

.btn-survey-skip { margin-right: auto; }



/* Live hex count in survey nav */
.survey-hex-count {
    font-size: 12px;
    font-weight: 600;
    color: rgba(81, 162, 182, 1);
    margin-left: auto;
    white-space: nowrap;
    padding: 4px 10px;
    background: rgba(81, 162, 182, 0.12);
    border-radius: 6px;
    transition: color 0.2s ease;
}

.survey-hex-count:empty {
    display: none;
}

.survey-hex-count-low {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.12);
}

.survey-next-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Business Criteria (Biz Focus) Section */
.biz-focus-section {
    padding: 10px 14px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.analysis-biz-focus {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 0;
}

.biz-focus-section-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.biz-focus-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0,0,0,0.45);
}

.biz-focus-edit {
    background: none;
    border: none;
    color: var(--c-teal);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.biz-focus-edit:hover { background: rgba(81,162,182,0.15); }

.biz-focus-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.biz-focus-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px 8px;
    background: rgba(201,57,163,0.08);
    border: 1px solid rgba(201,57,163,0.32);
    border-radius: 20px;
    font-size: 11px;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.15s ease;
}

.biz-focus-chip:hover { background: rgba(201,57,163,0.2); }

.biz-focus-chip-remove {
    background: none;
    border: none;
    color: rgba(0,0,0,0.4);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
}

.biz-focus-chip-remove:hover { color: #1a1a1a; }

.biz-focus-empty {
    font-size: 11px;
    color: rgba(0,0,0,0.3);
    font-style: italic;
}

/* Raw / Advanced Filters Collapsible Toggle */
.raw-filters-toggle > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(0,0,0,0.38);
    cursor: pointer;
    list-style: none;
    transition: color 0.15s ease;
    user-select: none;
}

.raw-filters-toggle > summary::-webkit-details-marker { display: none; }

.raw-filters-toggle > summary:hover { color: rgba(0,0,0,0.75); }

.raw-filters-toggle > summary::before {
    content: '▶';
    font-size: 8px;
    transition: transform 0.2s ease;
}

.raw-filters-toggle[open] > summary::before { transform: rotate(90deg); }


/* Biz Focus Rows (full question + answer) */
.biz-focus-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.biz-focus-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

.biz-focus-row-q {
    font-size: 11px;
    color: rgba(0,0,0,0.45);
    line-height: 1.3;
}

.biz-focus-row-a {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.biz-focus-answer-val {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
}

.biz-focus-change {
    background: none;
    border: 1px solid rgba(81,162,182,0.4);
    color: var(--c-teal);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.biz-focus-change:hover {
    background: rgba(81,162,182,0.15);
    border-color: var(--c-teal);
}

/* Business Type Picker in Survey */
.survey-biz-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.survey-biz-selected {
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(201, 57, 163, 0.1);
    border: 1px solid rgba(201, 57, 163, 0.3);
}
.survey-biz-list {
    display: block;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 6px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

/* We use margin instead of flex gap to separate the categories */
.survey-biz-type-group {
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px; 
}

.survey-biz-type-group:last-child {
    margin-bottom: 0;
}

/* Make the Chrome/Safari scrollbar slightly thicker and brighter */
.survey-biz-list::-webkit-scrollbar {
    width: 8px;
}
.survey-biz-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    margin: 4px 0;
}
.survey-biz-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}
.survey-biz-type-group {
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    overflow: hidden;
}
.survey-biz-type-header {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
    background: rgba(0,0,0,0.04);
}
.survey-biz-type-cats {
    list-style: none;
    margin: 0;
    padding: 2px 0 4px 0;
}
.survey-biz-cat-item {
    font-size: 13px;
    padding: 5px 12px 5px 20px;
    cursor: pointer;
    color: rgba(0,0,0,0.65);
    transition: background 0.15s;
    border-radius: 4px;
}
.survey-biz-cat-item:hover {
    background: rgba(0,0,0,0.05);
}
.survey-biz-cat-item.selected {
    color: var(--c-magenta);
    font-weight: 600;
    background: rgba(201,57,163,0.1);
}

/* City Picker in Survey */
.survey-city-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.survey-city-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 28px;
    padding: 4px 0;
}

.survey-city-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(201,57,163,0.15);
    border: 1px solid rgba(201,57,163,0.4);
    border-radius: 20px;
    font-size: 11px;
    color: #1a1a1a;
}

.survey-city-chip button {
    background: none;
    border: none;
    color: rgba(0,0,0,0.55);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.survey-city-chip button:hover { color: rgba(0,0,0,0.85); }

.survey-city-none {
    font-size: 11px;
    color: rgba(0,0,0,0.5);
    font-style: italic;
    padding: 4px 0;
}

.survey-city-search {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.survey-city-search:focus { border-color: rgba(81,162,182,0.6); }

.survey-city-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 4px;
}

.survey-city-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(0,0,0,0.7);
    transition: background 0.12s ease;
}

.survey-city-option:hover { background: rgba(0,0,0,0.05); }

.survey-city-option.selected {
    background: rgba(201,57,163,0.08);
    color: #1a1a1a;
}

.survey-city-option input[type=checkbox] {
    accent-color: var(--c-magenta);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Light theme overrides for new components */



/* Multi-select hint & edit mode badge */
.survey-multi-hint {
    font-size: 11px;
    font-weight: 400;
    color: rgba(0,0,0,0.38);
    margin-left: 4px;
}

.survey-edit-mode {
    color: var(--c-magenta);
    font-weight: 600;
}

/* City hierarchy in survey modal */
.survey-city-district {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 2px;
}

.survey-city-district > summary {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0,0,0,0.6);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.survey-city-district > summary::-webkit-details-marker { display: none; }

.survey-city-district > summary::before {
    content: '▶';
    font-size: 7px;
    transition: transform 0.15s ease;
    color: rgba(0,0,0,0.35);
}

.survey-city-district[open] > summary::before { transform: rotate(90deg); }

.survey-city-district-count {
    font-size: 10px;
    color: rgba(0,0,0,0.4);
    font-weight: 400;
}

.survey-city-district-inner {
    padding: 0 4px 6px 16px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.survey-district-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex: 1;
}
.survey-district-toggle input[type="checkbox"] {
    accent-color: #ffc107;
    cursor: pointer;
}

.survey-city-all-israel {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    padding: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}



/* Force readable option text inside the white survey modal */
.modal-content .survey-option,
.modal-content .survey-option-label,
.modal-content .survey-biz-cat-item,
.modal-content .survey-biz-type-header,
.modal-content .survey-city-option,
.modal-content .survey-city-district > summary,
.modal-content .survey-city-district-count,
.modal-content .survey-city-none {
    color: rgba(0, 0, 0, 0.72);
}

.modal-content .survey-option.selected,
.modal-content .survey-city-option.selected,
.modal-content .survey-biz-cat-item.selected {
    color: #1a1a1a;
}

/* ── Color Legend ── */
.color-legend {
    position: fixed;
    top: 90px;
    left: 392px;
    z-index: 400;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 8px 16px 6px;
    min-width: 180px;
    max-width: 260px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    pointer-events: auto;
}
.color-legend-title {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.color-legend-bar {
    height: 12px;
    border-radius: 6px;
    width: 100%;
}
.color-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
    margin-top: 3px;
}




/* ── Hex Value Tooltip ── */
.hex-value-tooltip {
    position: fixed;
    z-index: 500;
    background: var(--c-glass);
    backdrop-filter: blur(6px);
    color: #222;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hex-explore-popup {
    position: fixed;
    z-index: 520;
    pointer-events: auto;
}

.hex-explore-popup .btn-analysis {
    background: var(--c-glass);
    backdrop-filter: blur(6px);
    color: #222;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hex-explore-popup .btn-analysis:hover:not(:disabled) {
    background: var(--c-glass);
    border-color: transparent;
}

