:root {
    --map-panel-bg: rgba(15, 15, 18, 0.88);
    --map-panel-border: rgba(255, 255, 255, 0.12);
    --map-panel-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    --map-card-bg: rgba(24, 24, 28, 0.95);
    --map-input-bg: rgb(0 0 0 / 31%);
    --map-accent: var(--accent, #C9FF42);
    --map-btn-icon: var(--accent, #C9FF42);
    --btn-blue: #899fc8;
    --btn-green: #adae73;
}

body[data-map-theme="dark"],
body[data-map-theme="night"],
body[data-map-theme="blueprint"],
body[data-map-theme="custom"] {
    --map-btn-icon: var(--accent, #C9FF42);
}

body[data-map-theme="light"] {
    --map-panel-bg: rgba(255, 255, 255, 0.94);
    --map-panel-border: rgba(0, 0, 0, 0.12);
    --map-panel-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    --map-card-bg: rgb(223 223 223);
    --map-input-bg: #f4e4ca63;
    --map-accent: #e1c496;
    --map-btn-icon: #b29361;
}

body[data-map-theme="light"][data-map-icon-color="green"] {
    --map-btn-icon: var(--btn-green);
}

body[data-map-theme="light"][data-map-icon-color="blue"] {
    --map-btn-icon: var(--btn-blue);
}

body.maps-page {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    overscroll-behavior: none !important;
    overscroll-behavior-y: none !important;
    touch-action: pan-x pan-y;
    background-color: var(--bg-primary, #09090b);
    display: flex;
    flex-direction: column;
}

#map-viewport {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none;
    overscroll-behavior: none;
}

a.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-bottom-right,
.mapboxgl-ctrl-attrib,
.mapboxgl-ctrl-top-right {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
}

.maps-top-container {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.maps-top-container.hidden {
    display: none !important;
}

.maps-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto;
}

.maps-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    color: var(--map-btn-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.maps-back-btn:hover {
    color: var(--map-accent);
    border-color: var(--map-accent);
}

.maps-title-pill {
    font-family: 'Space Mono';
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--map-accent);
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--map-panel-bg);
    border: 1px solid var(--map-panel-border);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.maps-search-card {
    background: transparent;
    border-radius: 28px;
    padding: 0;
    pointer-events: auto;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
    margin: 0 auto;
    transition: all 0.25s ease;
}

.compact-route-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--map-panel-border, rgba(255, 255, 255, 0.12));
    border-radius: 26px;
    padding: 12px 16px;
    gap: 14px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.route-track-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 32px;
    align-self: stretch;
    padding: 4px 0;
    flex-shrink: 0;
}

.route-track-origin {
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.route-track-origin-halo {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.route-track-origin-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 2.5px solid #e6e6e6;
    box-shadow: 0px 0px 10px 1px var(--accent);
    z-index: 1;
}

.route-track-line {
    flex: 1;
    width: 1.5px;
    background: rgba(255, 255, 255, 0.22);
    margin: 4px 0;
    min-height: 18px;
    border-radius: 1px;
}

.route-track-dest {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 26px;
    color: var(--accent);
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.route-fields-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.route-fields-col .route-input-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0;
    height: auto;
    min-height: 34px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.route-field-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.1;
    margin-bottom: 2px;
    letter-spacing: 0.2px;
    user-select: none;
}

.route-field-input-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 6px;
}

.route-fields-col .route-input-field {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg, #ffffff);
    font-family: inherit;
    font-size: 0.92rem !important;
    font-weight: 500;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.route-fields-col .route-input-field::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 400;
}

.route-fields-divider {
    width: 100%;
    height: 0.5px;
    background: var(--map-panel-border, rgba(255, 255, 255, 0.08));
    margin: 4px 0 5px 0;
}

.route-btn-action {
    background: transparent;
    border: none;
    color: rgba(200, 200, 210, 0.7);
    font-size: 0.8rem;
    padding: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.route-btn-action:hover {
    color: var(--map-accent);
}

.route-swap-col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.compact-route-card .btn-swap-locations {
    position: static;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--fg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    z-index: 5;
    flex-shrink: 0;
    transition: all 0.22s ease;
    box-sizing: border-box;
}

.compact-route-card .btn-swap-locations:hover {
    color: var(--map-accent);
    border-color: var(--map-accent);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.06);
}

.compact-route-card .btn-swap-locations:active {
    transform: scale(0.94);
}

.compact-route-card .search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 45;
}

body[data-map-theme="light"] .route-track-line {
    background: rgba(0, 0, 0, 0.18);
}

body[data-map-theme="light"] .route-field-label {
    color: rgba(0, 0, 0, 0.5);
}

body[data-map-theme="light"] .route-fields-divider {
    background: rgba(0, 0, 0, 0.08);
}

body[data-map-theme="light"] .route-fields-col .route-input-field {
    color: #0f172a;
}

body[data-map-theme="light"] .route-fields-col .route-input-field::placeholder {
    color: rgba(0, 0, 0, 0.38);
}

body[data-map-theme="light"] .compact-route-card .btn-swap-locations {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

body[data-map-theme="light"] .compact-route-card .btn-swap-locations:hover {
    color: var(--map-btn-icon);
    border-color: var(--map-btn-icon);
    background: rgba(0, 0, 0, 0.08);
}

.search-suggestions {
    position: absolute;
    top: 145px;
    left: 0;
    right: 0;
    background: var(--map-card-bg);
    border: 1px solid var(--map-panel-border);
    border-radius: 24px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 30;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

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

.suggestion-item:hover {
    background: var(--border);
}

.suggestion-icon {
    font-size: 0.8rem;
    color: var(--map-accent);
    margin-top: 6px;
}

.suggestion-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.suggestion-name {
    font-family: 'Space Mono';
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-address {
    font-family: 'Space Mono';
    font-size: 0.68rem;
    color: rgba(180, 180, 190, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.category-chips-bar {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding-right: 28px;
}

.category-chips-bar::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(14, 14, 18, 0.65);
    border: 0.5px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r24, 24px);
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.cat-chip i {
    color: var(--map-btn-icon);
    font-size: 0.72rem;
    transition: color 0.2s ease;
}

.cat-chip:hover {
    border-color: var(--accent);
    background: rgba(26, 26, 32, 0.82);
    color: var(--fg);
}

.cat-chip:hover i {
    color: var(--accent);
}

.cat-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(22, 22, 28, 0.88);
}

.cat-chip.active i {
    color: var(--accent);
}

body[data-map-theme="light"] .cat-chip,
body[data-map-theme="light"] .cat-chip.lgm {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body[data-map-theme="light"] .cat-chip:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--border);
    color: var(--fg);
}

body[data-map-theme="light"] .cat-chip:hover i {
    color: var(--accent);
}

body[data-map-theme="light"] .cat-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.95);
}

body[data-map-theme="light"] .cat-chip.active i {
    color: var(--accent);
}

.poi-cat-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
}

.poi-cat-marker:hover {
    transform: scale(1.15);
    z-index: 20;
}

.poi-cat-marker-bubble {
    width: 34px;
    height: 34px;
    border-radius: var(--r50, 50%);
    background: var(--card);
    border: 2px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px var(--shadow, rgba(0, 0, 0, 0.5));
    transition: all 0.2s ease;
}

.poi-cat-marker:hover .poi-cat-marker-bubble,
.poi-cat-marker.active .poi-cat-marker-bubble {
    background: var(--accent);
    color: var(--bg);
}

.poi-cat-marker-label {
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: var(--r12, 12px);
    background: var(--card);
    color: var(--fg);
    border: 0.5px solid var(--border1);
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.35));
    pointer-events: none;
}

body[data-map-theme="light"] .poi-cat-marker-bubble {
    background: var(--card);
    border-color: var(--accent);
    color: var(--accent);
}

body[data-map-theme="light"] .poi-cat-marker-label {
    background: var(--card);
    color: var(--fg);
    border-color: var(--border1);
}

.maps-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Space Mono';
    font-size: 0.72rem;
    color: var(--map-accent);
    margin-top: 6px;
    letter-spacing: 1px;
}

.maps-loader.active {
    display: flex;
}

.maps-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75vh;
    max-height: 600px;
    z-index: 25;
    border-radius: 46px 46px 0 0;
    transform: translateY(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.maps-bottom-sheet.peek {
    transform: translateY(calc(100% - 270px));
}

.maps-bottom-sheet.expanded {
    transform: translateY(0);
}

.maps-bottom-sheet.dragging,
.place-card-sheet.dragging {
    transition: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.sheet-drag-handle-wrap {
    width: 100%;
    padding: 14px 0 16px 0;
    display: flex;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.sheet-drag-handle-wrap:active {
    cursor: grabbing;
}

.sheet-drag-handle {
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.2s ease, transform 0.2s ease;
}

.sheet-drag-handle-wrap:hover .sheet-drag-handle,
.sheet-drag-handle-wrap:active .sheet-drag-handle {
    background: var(--map-accent);
    transform: scaleX(1.15);
}

.sheet-peek-content {
    padding: 0 34px 20px 34px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.sheet-peek-content button,
.sheet-peek-content input,
.sheet-peek-content label {
    touch-action: manipulation;
    pointer-events: auto;
}

.route-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.route-summary-title {
    font-family: 'Space Mono';
    font-size: 0.75rem;
    color: rgba(180, 180, 190, 0.85);
    display: flex;
    align-items: center;
    gap: 6px;
}

.route-summary-badge {
    background: var(--border);
    color: var(--map-accent);
    border-radius: 10px;
    padding: 3px 8px;
    font-size: 0.62rem;
    font-weight: 500;
}

.sheet-close-btn {
    background: none;
    border: none;
    color: rgba(200, 200, 210, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px 24px;
}

.sheet-metrics-row {
    display: grid;
    grid-template-columns: 1.7fr 1.2fr 2fr;
    gap: 30px;
}

.sheet-metric-box {
    padding: 4px 0px;
    border-right: 1px solid var(--border1);
    display: flex;
    flex-direction: column;
}

.sheet-metric-val {
    font-family: 'Space Mono';
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--map-accent);
}

.sheet-metric-box.fuel .sheet-metric-val {
    color: #f59e0b;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.sheet-metric-box:last-child {
    border-right: 0;
}

.sheet-metric-label {
    font-family: 'Space Mono';
    font-size: 0.62rem;
    color: rgba(180, 180, 190, 0.65);
    text-transform: uppercase;
}

.sheet-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.btn-start-nav {
    flex: 1;
    height: 48px;
    background: var(--map-accent);
    color: #09090b;
    border: none;
    border-radius: 30px;
    font-family: 'Space Mono';
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-start-nav:hover {
    filter: brightness(1.1);
}

.btn-view-steps {
    height: 48px;
    padding: 0 17px;
    background: var(--map-input-bg);
    border: 1px solid var(--map-panel-border);
    border-radius: 30px;
    color: var(--fg);
    font-family: 'Space Mono';
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-view-steps:hover {
    border-color: var(--map-accent);
    color: var(--map-accent);
}

.btn-icon-action {
    width: 48px;
    height: 48px;
    border-radius: 30px;
    background: var(--map-input-bg);
    border: 1px solid var(--map-panel-border);
    color: var(--map-btn-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-icon-action:hover {
    border-color: var(--map-accent);
    color: var(--map-accent);
}

.sheet-expanded-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px 24px 28px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    touch-action: pan-y;
}

.route-alternatives-container {
    display: flex;
    gap: 21px;
    scrollbar-width: none;
}

.alt-route-pill {
    flex: 1;
    min-width: 100px;
    padding: 8px 14px;
    background: var(--map-input-bg);
    border: 1px solid var(--map-panel-border);
    border-radius: 18px;
    font-family: 'JetBrains Mono';
    font-size: 0.7rem;
    color: var(--fg);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}

.alt-route-pill * {
    pointer-events: none;
}

.alt-route-pill.active {
    font-weight: 500;
    border: 1px solid #f59e0b;
    border-left: 5px solid #f59e0b;
    background:
        color-mix(in srgb, #f59e0b 10%, transparent);
}

.fuel-breakdown-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--map-input-bg);
    padding: 12px 14px;
    font-family: 'JetBrains Mono';
}

.fuel-card-header {
    font-size: 0.68rem;
    font-weight: 500;
    color: #f59e0b;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fuel-card-details {
    font-size: 0.72rem;
    color: rgba(220, 220, 230, 0.9);
    line-height: 1.4;
}

.route-steps-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: var(--map-input-bg);
    border-radius: 15px;
}

.step-item.highlight {
    background: var(--map-panel-border);
}

.step-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--map-accent);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-info {
    flex: 1;
    overflow: hidden;
}

.step-instruction {
    font-family: 'Space Mono';
    font-size: 0.76rem;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-distance {
    font-family: 'Space Mono';
    font-size: 0.65rem;
    color: rgba(180, 180, 190, 0.65);
    margin-top: 1px;
}

.active-nav-hud {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    pointer-events: none;
}

.active-nav-hud.active {
    display: block;
}

.nav-hud-top {
    position: absolute;
    top: 34px;
    left: 34px;
    right: 34px;
    max-width: 480px;
    margin: 0 auto;
    background: transparent;
    border-radius: 30px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
}

.nav-turn-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 18px;
    background: var(--map-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--map-accent);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.nav-turn-text {
    flex: 1;
    overflow: hidden;
}

.nav-turn-dist {
    font-family: 'JetBrains Mono';
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--fg);
}

.nav-turn-street {
    font-family: 'JetBrains Mono';
    font-size: 0.78rem;
    color: rgba(200, 200, 215, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.nav-hud-bottom {
    position: absolute;
    bottom: 34px;
    left: 34px;
    right: 34px;
    max-width: 479px;
    margin: 0 auto;
    background: var(--map-card-bg);
    border: 1px solid var(--map-panel-border);
    border-radius: 30px;
    padding: 20px 20px 20px 24px;
    box-shadow: var(--map-panel-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto;
}

.nav-stats-grid {
    display: flex;
    gap: 10px;
}

.nav-stat-item {
    display: flex;
    flex-direction: column;
    padding-right: 15px;
    border-right: 1px solid var(--border1);
}

.nav-stat-val {
    font-family: 'JetBrains Mono';
    font-size: 1rem;
    font-weight: 500;
    color: var(--map-accent);
}

.nav-stat-label {
    font-family: Inter;
    letter-spacing: 0.5px;
    font-size: 0.62rem;
    color: rgba(180, 180, 190, 0.65);
}

.btn-exit-nav {
    height: 36px;
    padding: 0 20px;
    background: rgb(239 68 68 / 20%);
    border: none;
    border-radius: 15px;
    color: #ef4444;
    font-family: 'Space Mono';
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-exit-nav:hover {
    background: #ef4444;
    color: #000000;
}

.floating-locate-btn {
    position: absolute;
    bottom: 24px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--map-panel-bg);
    border: 1px solid var(--map-panel-border);
    color: var(--fg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 15;
    transition: all 0.2s ease;
}

.floating-locate-btn:hover {
    color: var(--map-accent);
    border-color: var(--map-accent);
    transform: scale(1.05);
}

.floating-recenter-btn {
    display: none;
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--map-accent);
    color: #09090b;
    border: none;
    font-family: 'Space Mono';
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 38;
    transition: all 0.2s ease;
}

.floating-recenter-btn.active {
    display: flex;
    align-items: center;
    gap: 6px;
}

.floating-recenter-btn:hover {
    filter: brightness(1.1);
    transform: translateX(-50%) scale(1.04);
}

.pin-drop-card {
    display: none;
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 76px;
    max-width: 380px;
    background: var(--map-panel-bg);
    border: 1px solid var(--map-panel-border);
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: var(--map-panel-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 22;
}

.pin-drop-card.active {
    display: block;
}

.pin-drop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.pin-drop-title {
    font-family: 'Space Mono';
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--fg);
}

.pin-drop-coords {
    font-family: 'Space Mono';
    font-size: 0.68rem;
    color: var(--map-accent);
    margin-top: 2px;
}

.pin-drop-close {
    background: none;
    border: none;
    color: rgba(200, 200, 210, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
}

.motolink-marker-origin {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.marker-pulse {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgb(255 255 255 / 25%);
    border: 1px solid rgb(255 255 255 / 45%);
    animation: marker-pulse-anim 2s infinite ease-out;
}

@keyframes marker-pulse-anim {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.rider-nav-chevron-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease-out;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}

.rider-nav-chevron {
    width: 36px;
    height: 36px;
}

.rider-nav-chevron path {
    fill: var(--map-accent);
    stroke: #09090b;
    stroke-width: 2.5px;
}

.motolink-marker-pindrop {
    color: #ca0f0f;
    font-size: 1.8rem;
    pointer-events: none;
}

.pin-drop-bounce {
    animation: bounce-pin 0.3s ease-out;
}

@keyframes bounce-pin {
    0% {
        transform: translateY(-16px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.motolink-marker-destination {
    color: var(--map-accent);
    font-size: 1.6rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.maps-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.maps-modal-backdrop.active {
    display: flex;
}

.maps-modal-card {
    background: var(--map-card-bg, rgba(24, 24, 28, 0.98));
    border: 1px solid var(--map-panel-border, rgba(255, 255, 255, 0.12));
    border-radius: 24px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--map-panel-shadow, 0 16px 40px rgba(0, 0, 0, 0.65));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.maps-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.maps-modal-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--map-accent, #C9FF42);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.maps-modal-close {
    background: transparent;
    border: none;
    color: var(--fg, #ffffff);
    opacity: 0.6;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.maps-modal-close:hover {
    opacity: 1;
}

.maps-modal-body {
    margin-bottom: 14px;
}

.maps-modal-footer {
    display: flex;
    gap: 10px;
}

.maps-settings-fullscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    z-index: 60;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    flex-direction: column;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.maps-settings-fullscreen.active {
    display: flex;
}

:root.amoled-theme .maps-settings-fullscreen {
    background: #000000 !important;
}

.maps-settings-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    font-family: 'JetBrains Mono';
    padding: 24px 18px 40px 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    gap: 14px;
}

.maps-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 2px 2px;
}

.settings-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.maps-settings-back-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--fg);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.maps-settings-back-btn:hover {
    background: #1e1e23;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(-1px);
}

.settings-header-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-header-title {
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fg);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.settings-header-subtitle {
    font-size: 0.8rem;
    color: #8e8e93;
    margin: 0;
    line-height: 1.2;
    font-weight: 400;
}

.settings-header-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: #52525b;
    line-height: 1.35;
    font-family: 'Space Mono', monospace;
}

.maps-settings-content {
    display: flex;
    flex-direction: column;
}

.map-setting-card {
    background: var(--card);
    border-radius: 30px;
    padding: 16px 16px 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.setting-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.setting-card-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 15px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.setting-card-title-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.setting-card-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.1px;
}

.setting-card-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.64rem;
    font-weight: 700;
    color: #71717a;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.setting-card-tag-multiline {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.68rem;
    color: #71717a;
    line-height: 1.25;
    text-align: right;
    flex-shrink: 0;
}

.map-theme-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.map-theme-thumb-card {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    outline: none;
}

.map-theme-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 11;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
}

.map-theme-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-theme-thumb-label {
    font-size: 0.76rem;
    font-weight: 500;
    color: #8e8e93;
    font-family: 'JetBrains Mono';
    transition: color 0.2s, font-weight 0.2s;
}

.map-theme-thumb-card:hover .map-theme-thumb-wrap {
    border-color: rgba(255, 255, 255, 0.25);
}

.map-theme-thumb-card.active .map-theme-thumb-wrap {
    outline: 2px solid var(--accent);
}

.map-theme-thumb-card.active .map-theme-thumb-label {
    color: var(--fg);
    font-weight: 600;
}

.setting-card-pill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.map-color-pill-btn {
    height: 48px;
    border-radius: 9999px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--fg);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.map-color-pill-btn.active {
    font-weight: 600;
    background:
        color-mix(in srgb, var(--border) 70%, transparent);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.color-dot.dot-blue {
    background-color: #2b7fff;
    box-shadow: 0 0 8px rgba(43, 127, 255, 0.6);
}

.color-dot.dot-green {
    background-color: #84cc16;
    box-shadow: 0 0 8px rgba(132, 204, 22, 0.6);
}

.map-feature-pill-btn {
    height: 60px;
    border-radius: 38px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    outline: none;
}

.map-feature-pill-btn.active {
    border-color: rgba(255, 255, 255, 0.2);
    background: color-mix(in srgb, var(--border) 70%, transparent);
}

.feature-pill-icon {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.feature-pill-icon.blue-icon {
    color: #2b7fff;
}

.feature-pill-icon.gray-icon {
    color: #71717a;
}

.feature-pill-text-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-pill-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--fg);
}

.feature-pill-desc {
    font-size: 0.7rem;
    color: #71717a;
}

.map-feature-pill-btn.active .feature-pill-title {
    color: #3b82f6;
}

.map-feature-pill-btn.active .feature-pill-desc {
    color: #93c5fd;
}

.ios-switch {
    position: relative;
    width: 48px;
    height: 28px;
    display: inline-block;
    flex-shrink: 0;
    cursor: pointer;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ios-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #27272a;
    border-radius: 28px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ios-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.ios-switch input:checked+.ios-slider {
    background-color: #2b7fff;
}

.ios-switch input:checked+.ios-slider::before {
    transform: translateX(20px);
}

.token-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    flex-shrink: 0;
}

.token-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    display: inline-block;
}

.token-status-text {
    color: #22c55e;
}

.token-input-capsule {
    height: 48px;
    background: #121215;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.token-input-capsule:focus-within {
    border-color: #2b7fff;
    box-shadow: 0 0 14px rgba(43, 127, 255, 0.25);
}

.token-shield-icon {
    color: #71717a;
    font-size: 1rem;
    flex-shrink: 0;
}

.token-text-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--fg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    letter-spacing: 2px;
    min-width: 0;
}

.token-eye-btn {
    background: transparent;
    border: none;
    color: #71717a;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s;
    outline: none;
    flex-shrink: 0;
}

.token-eye-btn:hover {
    color: var(--fg);
}

.btn-save-token-primary {
    width: 100%;
    height: 52px;
    border-radius: 9999px;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.98rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 36px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    outline: none;
}

.btn-save-token-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

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

.mobile-search-trigger {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 58px;
    background: transparent;
    border-radius: 50px;
    padding: 0px 12px 0px 22px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.mobile-search-trigger.hidden {
    display: none !important;
}

.search-trigger-icon {
    font-size: 1rem;
    color: var(--map-btn-icon);
    flex-shrink: 0;
}

.search-trigger-placeholder {
    font-family: 'Space Mono';
    font-size: 0.82rem;
    color: var(--text1);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-trigger-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 0.5px solid var(--border);
    color: var(--map-btn-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    z-index: 50;
    flex-direction: column;
    padding: 54px 14px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100vw;
}

.mobile-search-overlay.active {
    display: flex;
}

.search-overlay-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.search-overlay-back {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    color: var(--text1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.search-overlay-back:hover {
    background: var(--card);
}

.search-overlay-input-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--card);
    border: 0.5px solid var(--border);
    border-radius: 50px;
    padding: 0 18px;
    height: 58px;
    box-sizing: border-box;
    min-width: 0;
}

.search-overlay-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: 'Space Mono', sans-serif;
    font-size: 0.85rem;
    color: var(--fg);
    min-width: 0;
}

.search-overlay-input::placeholder {
    color: var(--text1);
}

.search-overlay-clear {
    background: none;
    border: none;
    color: var(--text1);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay-subbar {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
}

.btn-choose-on-map {
    flex: 1;
    min-width: 0;
    height: 48px;
    background: transparent;
    border: 0.5px solid var(--border);
    border-radius: 50px;
    color: var(--fg);
    font-family: 'Space Mono', sans-serif;
    font-size: 0.78rem;
    padding: 0 24px;
    box-sizing: border-box;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-choose-on-map:hover {
    border-color: var(--border-splash);
    background: var(--map-card-bg);
}

.btn-overlay-coords {
    height: 48px;
    padding: 0 16px;
    background: var(--card);
    border: 0.5px solid var(--border);
    border-radius: 50px;
    color: var(--fg);
    font-family: 'Space Mono', sans-serif;
    font-size: 0.74rem;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.btn-overlay-coords:hover {
    border-color: var(--map-accent);
}

.category-chips-bar.overlay {
    margin-top: 12px;
    padding-bottom: 12px;
    padding-right: 28px;
    border-bottom: 0.5px solid var(--border);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
}

.category-chips-bar.overlay::-webkit-scrollbar {
    display: none;
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin-top: 6px;
}

.search-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 0.5px solid rgb(255 255 255 / 7%);
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-result-row:hover,
.search-result-row:active {
    background: var(--border);
}

.result-icon-box {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--map-accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    overflow: hidden;
}

.result-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-name {
    font-family: 'Space Mono';
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-badge {
    font-family: 'Space Mono';
    font-size: 0.58rem;
    padding: 1px 5px;
    border-radius: 7px;
    background: var(--border1);
    color: var(--map-accent);
    text-transform: uppercase;
    flex-shrink: 0;
}

.result-distance-pill,
.suggestion-dist-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--map-accent);
    border-bottom: 0.5px solid var(--accent-grey);
    padding: 2px 2px;
    flex-shrink: 0;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.result-address {
    font-family: 'Space Mono';
    font-size: 0.68rem;
    color: rgba(180, 180, 195, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.place-card-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 28;
    border-radius: 50px 50px 0 0;
    padding: 10px 34px 34px 34px;
    transform: translateY(110%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.place-card-sheet.active {
    display: block;
    transform: translateY(0);
}

.place-drag-handle-wrap {
    width: 100%;
    padding: 8px 0 4px 0;
    display: flex;
    justify-content: center;
    cursor: grab;
    touch-action: none;
}

.place-card-content {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.place-card-actions button,
.place-card-close {
    touch-action: manipulation;
    pointer-events: auto;
}

.place-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 4px;
}

.place-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.place-card-title {
    font-family: 'Space Mono';
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-card-badge {
    font-family: 'Space Mono';
    font-size: 0.62rem;
    padding: 3px 7px;
    border-radius: 10px;
    background: var(--map-card-bg);
    color: var(--map-accent);
    text-transform: uppercase;
}

.place-card-close {
    background: none;
    border: none;
    color: rgba(200, 200, 210, 0.7);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
}

.place-card-address {
    font-family: 'Space Mono';
    font-size: 0.72rem;
    color: rgba(190, 190, 205, 0.8);
    margin-top: 4px;
    line-height: 1.4;
}

.place-card-meta {
    font-family: 'Space Mono';
    font-size: 0.65rem;
    color: var(--map-accent);
    margin-top: 4px;
}

.place-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-place-action {
    flex: 1;
    height: 48px;
    border-radius: 30px;
    background: var(--map-input-bg);
    border: 1px solid var(--map-panel-border);
    color: var(--fg);
    font-family: 'Space Mono';
    font-size: 0.76rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-place-action.primary {
    background: var(--map-accent);
    color: #09090b;
    border: none;
}

.btn-place-action:hover {
    filter: brightness(1.1);
}

.route-pref-toggle {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    user-select: none;
}

.route-pref-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 38px;
    height: 22px;
    background: var(--border1);
    border-radius: 22px;
    position: relative;
    cursor: pointer;
    outline: none;
    border: none;
    transition: background 0.22s ease;
    flex-shrink: 0;
    margin: 0;
}

.route-pref-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.route-pref-toggle input[type="checkbox"]:checked::after {
    transform: translateX(16px);
    background: var(--bg);
}

.floating-map-controls {
    position: absolute;
    bottom: 24px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 18;
    transition: bottom 0.32s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: bottom;
}

body:has(.place-card-sheet.active) .floating-map-controls,
.floating-map-controls.shift-place {
    bottom: 190px;
}

body:has(.maps-bottom-sheet.peek) .floating-map-controls,
body:has(.maps-bottom-sheet.expanded) .floating-map-controls,
.floating-map-controls.shift-sheet {
    bottom: 280px;
}

body:has(#active-nav-hud.active) .floating-map-controls,
body:has(.active-nav-hud.active) .floating-map-controls,
.floating-map-controls.shift-nav {
    bottom: 145px;
}



.zoom-controls-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48px;
    border-radius: 30px;
    overflow: hidden;
    pointer-events: auto;
}

.zoom-btn {
    width: 100%;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--map-btn-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.zoom-btn:hover {
    color: var(--map-accent);
    background: rgba(255, 255, 255, 0.08);
}

.zoom-btn:active {
    transform: scale(0.92);
}

.zoom-divider {
    width: 28px;
    height: 1px;
    background: var(--map-panel-border);
    opacity: 0.6;
}

.floating-ctrl-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    color: var(--map-btn-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floating-ctrl-btn:hover {
    color: var(--map-accent);
    border-color: var(--border-splash);
    transform: scale(1.05);
}

.floating-ctrl-btn.active {
    background: rgba(201, 255, 66, 0.2);
    border-color: var(--map-accent);
    color: var(--map-accent);
}

@media (max-width: 767px) {
    .maps-search-card {
        display: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        border-radius: 26px;
    }

    .maps-top-container.planning .maps-search-card {
        display: block;
    }

    .maps-top-container.planning .mobile-search-trigger {
        display: none;
    }
}

.maps-sidebar-wrapper {
    display: contents;
}

@media (min-width: 768px) {

    .mobile-search-trigger,
    .mobile-search-overlay {
        display: none !important;
    }

    .maps-sidebar-wrapper {
        display: flex;
        flex-direction: column;
        gap: 12px;
        position: absolute;
        top: 20px;
        left: 20px;
        width: 410px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
        z-index: 20;
        pointer-events: none;
    }

    .maps-top-container {
        position: static;
        width: 100%;
        top: auto;
        left: auto;
        right: auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .maps-search-card {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .search-suggestions {
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        z-index: 35;
        max-height: 350px;
    }

    .maps-bottom-sheet {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 340px);
        border-radius: 26px;
        transform: none !important;
        display: none;
        pointer-events: auto;
        overflow: hidden;
        flex-direction: column;
        box-sizing: border-box;
    }

    .maps-bottom-sheet.peek,
    .maps-bottom-sheet.expanded {
        display: flex;
    }

    .sheet-drag-handle-wrap {
        display: none;
    }

    .sheet-peek-content {
        padding: 16px 18px 10px 18px;
        flex-shrink: 0;
    }

    .sheet-metrics-row {
        display: grid;
        grid-template-columns: 1.1fr 1fr 1.5fr;
        gap: 10px;
    }

    .sheet-metric-box {
        padding: 4px 6px;
    }

    .sheet-metric-val {
        font-size: 0.95rem;
    }

    .sheet-metric-box.fuel .sheet-metric-val {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .sheet-expanded-content {
        display: flex !important;
        flex-direction: column;
        gap: 14px;
        padding: 0 18px 18px 18px;
        overflow-y: auto;
        min-height: 0;
        flex: 1;
    }

    .route-alternatives-container {
        gap: 8px;
        flex-wrap: wrap;
    }

    .alt-route-pill {
        flex: 1;
        min-width: 0;
        padding: 6px 8px;
    }

    .turn-maneuvers-list {
        max-height: 220px;
        overflow-y: auto;
    }

    .place-card-sheet {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        border-radius: 26px;
        transform: none !important;
        pointer-events: auto;
        padding: 18px 20px;
        box-sizing: border-box;
    }

    .place-drag-handle-wrap {
        display: none;
    }

    .pin-drop-card {
        left: 450px;
        right: auto;
        bottom: 24px;
        max-width: 380px;
    }

    body:has(.place-card-sheet.active) .floating-map-controls,
    body:has(.maps-bottom-sheet.peek) .floating-map-controls,
    body:has(.maps-bottom-sheet.expanded) .floating-map-controls,
    body:has(#active-nav-hud.active) .floating-map-controls,
    body:has(.active-nav-hud.active) .floating-map-controls,
    .floating-map-controls.shift-place,
    .floating-map-controls.shift-sheet,
    .floating-map-controls.shift-nav,
    .floating-map-controls {
        bottom: 30px;
        right: 24px;
    }

    .active-nav-hud .nav-hud-top {
        top: 24px;
        left: 24px;
        max-width: 440px;
        margin: 0;
    }

    .active-nav-hud .nav-hud-bottom {
        bottom: 24px;
        left: 24px;
        max-width: 440px;
        margin: 0;
    }
}

.lgm {
    background: var(--lgm-bg);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 0.5px solid var(--lgm-border);
    box-shadow: var(--lgm-rim), var(--lgm-shadow);
}

body[data-lgm="disabled"] .lgm,
body[data-lgm="disabled"] .cat-chip,
body[data-lgm="disabled"] .maps-title-pill,
body[data-lgm="disabled"] .floating-locate-btn,
body[data-lgm="disabled"] .pin-drop-card,
body[data-lgm="disabled"] .nav-hud-top,
body[data-lgm="disabled"] .nav-hud-bottom {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: var(--bg) !important;
    box-shadow: none;
}

body[data-map-theme="light"][data-lgm="disabled"] .lgm,
body[data-map-theme="light"][data-lgm="disabled"] .cat-chip,
body[data-map-theme="light"][data-lgm="disabled"] .maps-title-pill,
body[data-map-theme="light"][data-lgm="disabled"] .floating-locate-btn,
body[data-map-theme="light"][data-lgm="disabled"] .pin-drop-card,
body[data-map-theme="light"][data-lgm="disabled"] .nav-hud-top,
body[data-map-theme="light"][data-lgm="disabled"] .nav-hud-bottom {
    background: var(--bg) !important;
}