* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #0f172a;
    color: #f1f5f9;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Controls styling with glassmorphism */
.sidebar {
    width: 420px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

header .subtitle {
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.control-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
}

.control-group h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #38bdf8;
    margin-bottom: 12px;
}

/* Segmented Control Buttons */
.segmented-control {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.segmented-control button {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.segmented-control button.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.segmented-control button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

.scenario-desc {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 10px;
    line-height: 1.5;
}

/* Sliders */
.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-container input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    transition: transform 0.1s;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#opacity-value {
    font-size: 14px;
    font-weight: 600;
    color: #38bdf8;
    width: 40px;
}

.layer-status {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 11px;
}

/* Basemap Toggle */
.toggle-control {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-control input[type="checkbox"] {
    position: relative;
    width: 44px;
    height: 22px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    border-radius: 11px;
    transition: background 0.3s;
    cursor: pointer;
}

.toggle-control input[type="checkbox"]:checked {
    background: #3b82f6;
}

.toggle-control input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background: #ffffff;
    transition: transform 0.3s;
}

.toggle-control input[type="checkbox"]:checked::before {
    transform: translateX(22px);
}

.control-label {
    font-size: 14px;
    color: #f1f5f9;
}

/* Legend items */
.legend-bar {
    height: 12px;
    border-radius: 4px;
    margin-bottom: 6px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
}

.legend-ticks {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 10px;
    line-height: 1;
}

.legend-ticks-rainfall {
    font-size: 8px;
}

.scenario-raster {
    visibility: visible !important;
}

/* Peak flow cards */
.cards-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: none;
}

.flow-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.flow-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.flow-card .card-header {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.flow-card .card-value {
    font-size: 20px;
    font-weight: 700;
    color: #f1f5f9;
}

.flow-card .card-sub {
    font-size: 12px;
    color: #38bdf8;
    margin-top: 2px;
}

/* Main Map and Chart styling */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#map {
    flex: 1;
    background: #0b0f19;
}

.chart-panel {
    height: 280px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    z-index: 9;
}

.chart-header h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #38bdf8;
}

.chart-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 0;
}

#hydrograph-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Expandable Details Section */
details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

details[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
}

summary {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #38bdf8;
    user-select: none;
    outline: none;
}

summary:hover {
    color: #f1f5f9;
}

.details-content {
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.6;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 300px;
    overflow-y: auto;
}

.details-content ul {
    padding-left: 16px;
}

.details-content p strong, .details-content li strong {
    color: #e2e8f0;
}

.limitations-note {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 6px;
    padding: 8px 12px;
    color: #f87171;
    font-size: 11px;
}

@media (max-width: 900px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .app-container {
        min-height: 100vh;
        height: auto;
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: none;
        padding: 18px;
        gap: 16px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    .main-content {
        min-height: 760px;
    }

    #map {
        min-height: 470px;
    }

    .chart-panel {
        height: 290px;
        padding: 14px 12px;
    }
}

@media (max-width: 520px) {
    .segmented-control {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .segmented-control button {
        min-height: 42px;
    }

    .main-content {
        min-height: 690px;
    }

    #map {
        min-height: 420px;
    }

    .chart-panel {
        height: 270px;
    }
}

/* Simplified storm-and-layer workflow */
.sidebar {
    width: 390px;
    padding: 18px;
    gap: 14px;
}

header h1 {
    font-size: 22px;
}

header .subtitle {
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}

.step-heading {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}

.step-heading h3 {
    margin: 1px 0 3px;
}

.step-heading p {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.35;
}

.step-number {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.layer-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
}

.layer-selector button {
    min-height: 40px;
    padding: 6px 4px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.layer-selector button.active {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.scenario-category {
    margin: 8px 2px 6px;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.what-if-label {
    margin-top: 12px;
}

.scenario-option {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 9px;
    width: 100%;
    margin-bottom: 6px;
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
    color: #e2e8f0;
    text-align: left;
    cursor: pointer;
}

.scenario-option:hover {
    border-color: rgba(56,189,248,0.4);
    background: rgba(255,255,255,0.07);
}

.scenario-option.active {
    border-color: #38bdf8;
    background: rgba(56,189,248,0.13);
    box-shadow: 0 0 0 1px rgba(56,189,248,0.15);
}

.scenario-option > span:last-child,
.scenario-option strong,
.scenario-option small {
    display: block;
}

.scenario-option strong {
    font-size: 12px;
}

.scenario-option small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.3;
}

.scenario-code {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(148,163,184,0.16);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.scenario-option.active .scenario-code {
    background: #38bdf8;
    color: #07111f;
}

.scenario-desc {
    margin-top: 9px;
    padding: 9px 10px;
    border-left: 3px solid #38bdf8;
    background: rgba(56,189,248,0.07);
    font-size: 12px;
}

.flow-card {
    padding: 9px 12px;
}

.flow-card .card-value {
    font-size: 17px;
}

.main-content {
    display: block;
}

#map {
    width: 100%;
    height: 100%;
}

.hydrograph-button {
    width: 100%;
    margin-top: 2px;
    padding: 10px 12px;
    border: 1px solid #38bdf8;
    border-radius: 8px;
    background: rgba(56,189,248,0.12);
    color: #e0f2fe;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.hydrograph-button:hover {
    background: rgba(56,189,248,0.22);
}

.hydrograph-dialog {
    width: min(940px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    background: #0f172a;
    color: #f1f5f9;
    box-shadow: 0 30px 90px rgba(0,0,0,0.65);
}

.hydrograph-dialog::backdrop {
    background: rgba(2,6,23,0.75);
    backdrop-filter: blur(4px);
}

.hydrograph-modal {
    padding: 18px;
}

.hydrograph-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 12px;
}

.hydrograph-modal-header span {
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hydrograph-modal-header h2 {
    margin-top: 3px;
    font-size: 22px;
}

.hydrograph-modal-header button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

#hydrograph-image {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 180px);
    border-radius: 8px;
    object-fit: contain;
    background: #0b1220;
}

.hydrograph-modal > p {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
}

.watershed-static-label {
    width: max-content !important;
    height: auto !important;
    padding: 6px 8px !important;
    border: 1px solid rgba(255,255,255,0.45) !important;
    border-radius: 4px !important;
    background: rgba(8,20,35,0.82) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.watershed-label-north-fork { color: #70e7ff !important; }
.watershed-label-south-fork { color: #ffc46b !important; }

.viewer-brand {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    align-items: center;
}

.viewer-brand img {
    display: block;
    width: 66px;
    height: 66px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.viewer-hook {
    padding: 14px;
    border: 1px solid rgba(56,189,248,0.42);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(14,116,144,0.24), rgba(30,64,175,0.16));
    box-shadow: 0 10px 28px rgba(2,6,23,0.28);
}

.viewer-hook > span {
    color: #7dd3fc;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.viewer-hook h2 {
    margin-top: 4px;
    color: #fff;
    font-size: 18px;
    line-height: 1.15;
}

.viewer-hook p {
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.45;
}

.viewer-hook p strong {
    color: #fff7ed;
}

.viewer-hook > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 10px;
}

.viewer-hook button {
    min-height: 36px;
    padding: 7px 8px;
    border: 1px solid #38bdf8;
    border-radius: 7px;
    background: #0284c7;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.viewer-hook button:last-child {
    border-color: rgba(255,255,255,0.24);
    background: rgba(255,255,255,0.08);
}

.viewer-hook button:hover {
    filter: brightness(1.12);
}

.locked-note {
    margin-top: 4px !important;
    color: #fbbf24 !important;
    font-size: 8px !important;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.legend-title {
    margin-bottom: 7px;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 700;
}

.legend-ticks-depth {
    font-size: 8px;
}

.legend-ticks-depth span {
    max-width: 16%;
    text-align: center;
}

.legend-ticks-rainfall span {
    max-width: 20%;
    text-align: center;
}

.depth-raster {
    filter: url(#depth-color-ramp);
}

.layer-selector button.locked,
.layer-selector button.locked:hover {
    background: rgba(255,255,255,0.025);
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

.layer-selector button small {
    display: block;
    margin-top: 2px;
    font-size: 8px;
    letter-spacing: 0.05em;
}

.locked-results-cta {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid rgba(245,158,11,0.55);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(245,158,11,0.14), rgba(249,115,22,0.08));
}

.locked-results-cta[hidden] {
    display: none;
}

.locked-results-cta span,
.locked-results-cta strong,
.locked-results-cta p {
    display: block;
}

.locked-results-kicker {
    margin-bottom: 4px;
    color: #fbbf24;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.locked-results-cta strong {
    color: #fff7ed;
    font-size: 13px;
    line-height: 1.3;
}

.locked-results-cta p {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 10px;
    line-height: 1.4;
}

.locked-results-cta a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    padding: 9px 10px;
    border-radius: 7px;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.locked-results-cta a:hover {
    background: #ea580c;
}

.cards-group[hidden],
.locked-flow-cta[hidden] {
    display: none !important;
}

.locked-flow-cta {
    padding: 14px;
    border: 1px solid rgba(249,115,22,0.62);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(249,115,22,0.18), rgba(127,29,29,0.12));
}

.locked-flow-cta > span {
    color: #fdba74;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.locked-flow-cta h3 {
    margin: 5px 0 0;
    color: #fff7ed;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}

.locked-flow-cta p {
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.45;
}

.locked-flow-cta a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 7px;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.locked-flow-cta a:hover {
    background: #ea580c;
}

@media (max-width: 900px) {
    .sidebar { width: 100%; }
    .main-content { min-height: 70vh; }
    .hydrograph-dialog { width: calc(100vw - 20px); }
}

@media (max-width: 520px) {
    .layer-selector button { min-height: 44px; }
    .hydrograph-modal { padding: 12px; }
}

/* Clay Flood Concepts Custom Styles */
.mission-block {
    margin: 14px 0;
    padding: 14px;
    border-left: 3px solid #f97316;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.mission-block .dedication {
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.mission-block strong {
    color: #ffffff;
}

.mission-block .learn-more-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    border-bottom: 1px dashed rgba(56, 189, 248, 0.4);
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 11px;
}

.mission-block .learn-more-link:hover {
    color: #7dd3fc;
    border-bottom: 1px solid #7dd3fc;
}

.quick-start-box {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.how-it-works-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.how-it-works-steps li {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
}

.how-it-works-steps li strong {
    color: #f1f5f9;
}

.choose-what-to-see-inlined {
    margin: 16px 0;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.onboarding-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.onboarding-buttons button {
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid #38bdf8;
    border-radius: 6px;
    background: #0284c7;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.onboarding-buttons button:last-child {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.onboarding-buttons button:hover {
    filter: brightness(1.12);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* Address Search Group */
.search-container {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#search-input {
    flex-grow: 1;
    min-height: 38px;
    padding: 8px 12px;
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

#search-input:focus {
    border-color: #38bdf8;
}

#btn-search {
    min-height: 38px;
    padding: 8px 16px;
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#btn-search:hover {
    background-color: #334155;
}

.search-status {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.5;
}

.search-status.loading {
    background: rgba(148, 163, 184, 0.08);
    color: #94a3b8;
    border-left: 3px solid #94a3b8;
}

.search-status.success {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    border-left: 3px solid #22c55e;
}

.search-status.error {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-left: 3px solid #ef4444;
}

/* Floating Map Card for Locked Scenarios */
.locked-map-card {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 290px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(249, 115, 22, 0.6);
    border-radius: 12px;
    padding: 18px;
    z-index: 1000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.locked-map-card[hidden] {
    display: none !important;
}

.locked-map-card .lock-icon {
    font-size: 26px;
    margin-bottom: 8px;
    color: #fb923c;
    text-shadow: 0 0 10px rgba(251, 146, 60, 0.3);
}

.locked-map-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff7ed;
    margin-bottom: 6px;
    text-transform: none;
    letter-spacing: 0;
}

.locked-map-card p {
    font-size: 11px;
    line-height: 1.5;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.locked-map-card a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background: #f97316;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.25);
}

.locked-map-card a:hover {
    background: #ea580c;
}

/* Welcome Overlay */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(2, 6, 23, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.welcome-overlay[hidden] {
    display: none !important;
}

.welcome-modal {
    position: relative;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

.close-overlay-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-overlay-btn:hover {
    color: #f8fafc;
}

.welcome-slide {
    display: none;
    min-height: 160px;
}

.welcome-slide.active {
    display: block;
}

.welcome-slide h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
}

.welcome-slide p {
    font-size: 13px;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0 0 20px 0;
}

.welcome-primary-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 11px 16px;
    background-color: #f97316;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

.welcome-primary-btn:hover {
    background-color: #ea580c;
}

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

.welcome-video-block {
    margin-bottom: 16px;
}

.welcome-video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background-color: #1e293b;
    border: 1px solid #475569;
    color: #38bdf8;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.welcome-video-btn:hover {
    background-color: #334155;
    border-color: #38bdf8;
    color: #f8fafc;
}

.welcome-video-btn .play-icon {
    font-size: 11px;
}

.welcome-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #1e293b;
}

.nav-arrow-btn {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.nav-arrow-btn:hover:not(:disabled) {
    background-color: rgba(56, 189, 248, 0.08);
}

.nav-arrow-btn:disabled {
    color: #475569;
    cursor: not-allowed;
}

.welcome-dots {
    display: flex;
    gap: 8px;
}

.welcome-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #334155;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.welcome-dot.active {
    background-color: #38bdf8;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}

/* Reopen Intro Button in Header */
.reopen-intro-btn {
    display: inline-block;
    margin-top: 8px;
    background: none;
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.reopen-intro-btn:hover {
    background-color: rgba(56, 189, 248, 0.1);
    border-color: #38bdf8;
}

.reopen-intro-btn:focus {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

/* Persistent Sidebar CTA */
.sidebar-cta-group {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.4));
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 12px;
    margin-top: 14px;
}

.cta-text {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.sidebar-cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px;
    background-color: #0284c7;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.sidebar-cta-btn:hover {
    background-color: #0369a1;
}

/* Founder Video Modal Overlay */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(2, 6, 23, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001; /* Must sit above welcome overlay */
    backdrop-filter: blur(6px);
}

.video-modal-overlay[hidden] {
    display: none !important;
}

.video-modal-container {
    position: relative;
    width: 90%;
    max-width: 720px;
    background-color: #020617;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 24px 12px 12px 12px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85);
    box-sizing: border-box;
}

.close-video-btn {
    position: absolute;
    top: 4px;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-video-btn:hover {
    color: #fff;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background-color: #000;
}

.video-wrapper video,
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Map Swipe Slider */
.map-swipe-toggle {
    position: absolute;
    top: 15px;
    left: 70px;
    z-index: 1000;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.map-swipe-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
}

.map-swipe-toggle.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.map-swipe-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 30px; /* Thicker invisible grab area */
    margin-left: -15px; /* Centered on position */
    background: transparent;
    z-index: 999;
    cursor: ew-resize;
    touch-action: none;
}

.map-swipe-divider::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 13px; /* Centers the 4px line in the 30px target */
    width: 4px;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.swipe-handle {
    position: absolute;
    top: 50%;
    left: 15px; /* Center of the 30px target */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0f172a;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: bold;
    user-select: none;
    pointer-events: none;
}

/* Mobile Media Query to Dock and Shrink Locked Map Card */
@media (max-width: 768px) {
    .locked-map-card {
        top: auto;
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        padding: 12px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
    }
    .locked-map-card .lock-icon {
        display: none;
    }
    .locked-map-card h3 {
        font-size: 13px;
        margin-bottom: 2px;
    }
    .locked-map-card p {
        font-size: 10px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    .locked-map-card a {
        padding: 8px;
        font-size: 11px;
    }
}

/* Get Help / Contact Me Button under onboarding guides */
.onboarding-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.contact-help-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    background: rgba(2, 132, 199, 0.15);
    color: #38bdf8;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-help-btn:hover {
    background: rgba(2, 132, 199, 0.3);
    color: #7dd3fc;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

/* CTA Button Group inside locked overlays */
.cta-button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.cta-primary-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    background: #f59e0b;
    border: 1px solid #d97706;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.cta-primary-btn:hover {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.cta-secondary-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.cta-secondary-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Bottom Sidebar CTA Buttons Group */
.sidebar-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.sidebar-sample-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.sidebar-sample-link:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.03);
}

/* Slide 3 Dual Button Layout */
.welcome-slide-buttons {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
}

.welcome-contact-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.welcome-contact-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

