:root {
    --bg-main: #202124;
    --bg-navbar: #1b1c1e;
    --bg-panel: #202124;
    --bg-input: #292a2d;
    --glass-bg: rgba(32, 33, 36, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);

    --primary: #8ab4f8;
    --primary-dim: rgba(138, 180, 248, 0.15);
    --success: #81c995;
    --text-main: #e8eaed;
    --text-muted: #9aa0a6;
}

/* 全局滚动条美�?*/
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.glass-theme {
    background: var(--bg-main);
    height: 100vh;
    color: var(--text-main);
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
    outline: none !important;
    /* 消除键盘操作时的焦点边框 */
    overflow: hidden !important;
    cursor: default;
}

#map.drawing-mode {
    cursor: crosshair !important;
}

.leaflet-container {
    cursor: default;
}

.leaflet-grab {
    cursor: default;
}

.leaflet-dragging .leaflet-grab {
    cursor: move !important;
}

#map:focus {
    outline: none !important;
}

*:focus {
    outline: none !important;
}

/* 顶部导航栏布局调整 */
.navbar {
    height: 60px;
    background: var(--bg-navbar);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    justify-content: space-between;
    z-index: 1100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-title-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    background: transparent;
}

.logo span {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.version-badge {
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    height: 22px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: rgba(96, 165, 250, 0.14) !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
    color: #93c5fd !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;
    font-family: 'JetBrains Mono', monospace !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* 导航栏搜索框样式 */
.nav-search {
    position: relative;
    z-index: 2000;
}

.search-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.nav-search .search-container {
    display: flex;
    align-items: center;
    background: #202124;
    border: 1px solid var(--glass-border);
    padding: 2px;
    border-radius: 8px;
    width: 100%;
    max-width: 380px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-search .search-container:focus-within {
    border-color: var(--primary);
    background: #292a2d;
}

.nav-search input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    padding: 8px 12px;
    outline: none !important;
    flex: 1;
    font-size: 0.875rem;
}

.search-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
}

.nav-search button#btn-search {
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 0 12px;
    height: 32px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-search button#btn-search:hover {
    color: white;
}

.search-clear-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none;
    color: #fff !important;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    margin-right: 4px;
    flex-shrink: 0;
}

.search-clear-btn svg {
    width: 12px;
    height: 12px;
}

/* 核心变更：只要有文字（visible 类存在），且鼠标移入容器时才显示 */
.search-container:hover .search-clear-btn.visible {
    opacity: 0.6;
    pointer-events: auto;
}

.search-clear-btn:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1);
}

/* 结果下拉菜单样式 (匹配图片) */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #1b1c1e;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    padding: 4px;
}

.result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 6px;
    color: #e8eaed;
    font-size: 0.8125rem;
    line-height: 1.5;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.result-item.selected {
    background: rgba(138, 180, 248, 0.12);
    outline: 1px solid rgba(138, 180, 248, 0.22);
}

.result-item .result-title {
    color: #fff;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.result-item .result-title mark {
    background: rgba(129, 201, 149, 0.22);
    color: #fff;
    padding: 0 2px;
    border-radius: 3px;
}

.result-item .result-address {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
}

.search-result-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    color: var(--primary);
    background: rgba(138, 180, 248, 0.12);
    border: 1px solid rgba(138, 180, 248, 0.18);
    border-radius: 999px;
    padding: 2px 6px;
    line-height: 1.2;
}

/* 自定义滚动条样式 */
.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.nav-group {
    display: flex;
    background: var(--bg-input);
    padding: 2px;
    border-radius: 9px;
    border: 1px solid var(--glass-border);
    height: 42px;
    /* 再次降低高度，追求极简视觉 */
    align-items: stretch;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    white-space: nowrap;
}

.layer-group .nav-btn {
    min-width: 68px;
    /* 进一步增加宽度，彻底解决“地形图”折行问�?*/
    flex: 0 0 auto;
    /* 禁用压缩，防止按钮变�?*/
    padding: 0 8px;
}

#layer-satellite {
    min-width: 50px;
}

.mode-group .nav-btn {
    padding: 0 10px;
    min-width: 44px;
}

.ratio-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.ratio-icon-wrap span {
    font-size: 0.625rem;
    font-weight: 700;
    opacity: 0.7;
    margin-top: 0px;
    transform: scale(0.95);
    /* 微调紧凑�?*/
}

.nav-btn.active {
    background: #4a4d51;
    color: white;
}

.nav-btn.active .ratio-icon-wrap span {
    opacity: 1;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
    margin: 0 4px;
}

.switch-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3c4043;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #bdc1c6;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(18px);
    background-color: #fff;
}

.switch-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.nav-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: none;
}

.nav-action-btn.primary {
    background: linear-gradient(90deg, #8ab4f8, #81c995);
    color: #1a1f1a;
    font-weight: 700;
}

.nav-action-btn.primary:hover {
    background: linear-gradient(90deg, #a8ccff, #9ddbb0);
}

.nav-action-btn.success {
    background: linear-gradient(90deg, #8ab4f8, #81c995) !important;
    color: #1a1f1a;
    font-weight: 700;
}

.coords-actions-row {
    display: flex;
    gap: 8px;
}

.action-glow-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.action-glow-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.action-glow-btn.primary:hover {
    background: linear-gradient(90deg, #a8ccff, #9ddbb0) !important;
    box-shadow: 0 6px 20px rgba(138, 180, 248, 0.32) !important;
}

.action-glow-btn.success:hover {
    background: linear-gradient(90deg, #a8ccff, #b7efc5) !important;
    box-shadow: 0 6px 20px rgba(129, 201, 149, 0.32) !important;
}

.action-glow-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 100%);
    transform: translateX(-130%);
    transition: transform 0.35s ease;
    pointer-events: none;
}

.action-glow-btn:hover::after {
    transform: translateX(130%);
}

.main-container {
    flex: 1;
    display: flex;
    background: #171717;
}

.map-wrapper {
    flex: 1;
    position: relative;
    background: #000;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-overlay-controls {
    position: absolute;
    top: 20px;
    right: 12px;
    /* 与下方的 12px 间距对齐 */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.aspect-ratio-badge {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(4px);
    pointer-events: none;
    /* 仅作为标签，不阻碍点击 */
}

/* 极致方块式地图切换器样式 (垂直排列) */
.layer-switcher-dropdown.square-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* 图层切换内部选项保持紧凑 */
    align-items: flex-end;
}

.aspect-ratio-group.square-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* 比例选择方块之间增加间隙 */
    align-items: flex-end;
}

.tianditu-levels-controls {
    position: absolute;
    right: 66px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    pointer-events: none;
}

.tianditu-levels-panel {
    width: 260px;
    padding: 14px 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(33, 36, 42, 0.96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.tianditu-levels-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.tianditu-levels-close {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.tianditu-levels-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.tianditu-levels-slider {
    width: 100%;
    accent-color: #8ab4f8;
    cursor: pointer;
}

.tianditu-levels-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.tianditu-levels-actions button {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

.export-basemap-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.export-basemap-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
}

.export-basemap-option input {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}

.layer-switcher-dropdown.square-group .layer-dropdown-menu {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* 绝对对齐：确保菜单项也靠右排队 */
    background: transparent;
    border: none;
    padding: 0;
    gap: 4px;
    box-shadow: none;
    animation: slideDownFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 4px;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.layer-switcher-dropdown.square-group .map-layer-item,
.map-control-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    /* 强制重置 ID 选择器可能带来的 min-width */
    max-width: 34px !important;
    background: #2f3033 !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 6px !important;
    color: #bdc1c6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0 !important;
    position: relative;
    box-sizing: border-box !important;
}

.layer-switcher-dropdown.square-group .map-layer-item:hover,
.map-control-btn:hover {
    background: #3c4043 !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    transform: translateY(-1px);
}

.layer-switcher-dropdown.square-group .map-layer-item.active,
.map-control-btn.active {
    background: #4a4d51 !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(138, 180, 248, 0.2);
}

.layer-img {
    width: 26px !important;
    height: 26px !important;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.2s;
    pointer-events: none;
}

.map-layer-item.active .layer-img {
    opacity: 1;
    transform: scale(1.05);
    /* 选中的轻微放大感 */
}

.layer-text-badge {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f6aa5 0%, #2aa1c0 55%, #a8d8e8 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    opacity: 0.78;
    transition: all 0.2s;
    pointer-events: none;
}

.map-layer-item.active .layer-text-badge {
    opacity: 1;
    transform: scale(1.05);
}

.layer-text-badge-vector {
    background: linear-gradient(135deg, #7a6cf2 0%, #9d8cff 55%, #f2b85c 100%);
}


.ratio-abbr {
    font-size: 0.65rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    letter-spacing: -0.5px;
    opacity: 0.8;
}

.map-control-btn.active .ratio-abbr {
    opacity: 1;
}

/* 顶栏工具组样式 */
.toolbar-group {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    padding: 0 !important;
}

.toolbar-group .header-icon-btn {
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
}

.toolbar-group .header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.toolbar-group .header-icon-btn.active {
    background: rgba(138, 180, 248, 0.12) !important;
    border-color: rgba(138, 180, 248, 0.3) !important;
    color: var(--primary) !important;
}

/* 工具项及标签样式 */
.nav-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-tool-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.8;
    line-height: 1;
    pointer-events: none;
    letter-spacing: 0.5px;
}

.map-coords-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    padding: 8px 24px;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    min-width: 280px;
    pointer-events: none;
    /* 防止遮挡地图操作 */
}

.coords-address {
    color: #fff;
    font-weight: 500;
    font-size: 0.8rem;
    opacity: 0.9;
    display: none;
}

.coords-values {
    color: var(--success);
    font-family: monospace;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

/* 测量面板固定位置 - 地图中央上方 */
#measure-result-panel {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--success);
    border-radius: 12px;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    0% {
        transform: translate(-50%, -30px);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.measure-panel-header {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 15px;
    white-space: nowrap;
}

#measure-result-content {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.95rem;
    color: var(--success);
    display: flex;
    gap: 15px;
    white-space: nowrap;
}

#measure-result-content b {
    color: #fff;
}

.registration-panel {
    width: 100%;
    overflow: hidden;
}

.registration-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.registration-panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.registration-panel-subtitle {
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.registration-panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0 0;
}

.registration-drop-hint {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(138, 180, 248, 0.3);
    background: rgba(138, 180, 248, 0.08);
    color: rgba(232, 234, 237, 0.9);
    font-size: 0.76rem;
    line-height: 1.6;
}

.registration-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.registration-meta-row strong {
    flex: 1;
    text-align: right;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    word-break: break-all;
}

.registration-info-box {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(138, 180, 248, 0.26);
    background: rgba(255, 255, 255, 0.035);
}

.registration-export-box {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.registration-radio-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.registration-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
}

.registration-radio-item input {
    margin: 0;
    accent-color: var(--primary);
}

.registration-info-title {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.registration-info-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.registration-info-name {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    word-break: break-all;
    cursor: pointer;
    transition: color 0.2s;
}

.registration-info-name:hover {
    color: var(--primary);
}

.registration-info-status {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.registration-tip-box {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(129, 201, 149, 0.28);
    background: rgba(129, 201, 149, 0.04);
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.registration-advanced-panel {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed rgba(138, 180, 248, 0.25);
    background: rgba(138, 180, 248, 0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.registration-advanced-actions {
    grid-template-columns: max-content 52px max-content;
    justify-content: start;
    gap: 6px;
    align-items: center;
}

.registration-mini-action {
    width: 52px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.registration-mini-action:hover {
    color: var(--success);
    border-color: rgba(129, 201, 149, 0.28);
}

.registration-mini-action.active {
    color: var(--primary) !important;
    border-color: rgba(138, 180, 248, 0.34) !important;
    background: rgba(138, 180, 248, 0.12) !important;
}

.registration-mini-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 52px;
}

.registration-meta-row input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
}

.registration-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.registration-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.registration-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.registration-switch-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.registration-switch input:checked + .registration-switch-slider {
    background: rgba(138, 180, 248, 0.28);
    border-color: rgba(138, 180, 248, 0.35);
}

.registration-switch input:checked + .registration-switch-slider::before {
    transform: translateX(18px);
    background: var(--primary);
}

.registration-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.registration-actions .nav-action-btn {
    padding: 10px 8px;
    font-size: 0.76rem;
}

.registration-surface {
    position: absolute;
    inset: 0;
    z-index: 950;
    pointer-events: none;
}

.registration-surface.drag-ready::after,
.registration-surface.drag-blocked::after {
    content: attr(data-drop-message);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 260px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    background: rgba(8, 12, 18, 0.84);
    color: #fff;
    font-size: 0.88rem;
    text-align: center;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.registration-surface.drag-ready::after {
    border-color: rgba(129, 201, 149, 0.5);
    color: var(--success);
}

.registration-surface.drag-blocked::after {
    border-color: rgba(129, 201, 149, 0.45);
    color: var(--success);
}

.registration-transform {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    border: 1px solid rgba(138, 180, 248, 0.9);
    box-shadow: 0 0 0 1px rgba(8, 12, 18, 0.4), 0 18px 40px rgba(0, 0, 0, 0.22);
    cursor: move;
    user-select: none;
    touch-action: none;
    pointer-events: auto;
}

.registration-transform img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.registration-warp-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
}

.registration-transform.advanced-active .registration-warp-canvas {
    display: block;
}

.registration-transform.advanced-active img {
    display: none;
}

.registration-control-point {
    position: absolute;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(8, 12, 18, 0.95);
    background: #ffb84d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
    cursor: grab;
    pointer-events: auto;
}

.registration-control-point.selected {
    background: #ff6b57;
    box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.22);
}

.registration-control-radius {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255, 184, 77, 0.35);
    background: rgba(255, 184, 77, 0.06);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.registration-history-bar {
    position: absolute;
    display: flex;
    gap: 8px;
    z-index: 960;
    pointer-events: auto;
}

.registration-history-btn {
    min-width: 64px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(138, 180, 248, 0.28);
    background: rgba(8, 12, 18, 0.82);
    color: var(--text-main);
    font-size: 0.75rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.registration-history-btn:hover:not(:disabled) {
    border-color: rgba(138, 180, 248, 0.48);
    color: #fff;
}

.registration-history-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.registration-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(8, 12, 18, 0.9);
    background: #8ab4f8;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    pointer-events: auto;
    touch-action: none;
}

.registration-handle.edge {
    width: 12px;
    height: 12px;
    background: #81c995;
}

.registration-handle.corner-nw,
.registration-handle.corner-se {
    cursor: nwse-resize;
}

.registration-handle.corner-ne,
.registration-handle.corner-sw {
    cursor: nesw-resize;
}

.registration-handle.edge-left,
.registration-handle.edge-right {
    cursor: ew-resize;
}

.registration-handle.edge-top,
.registration-handle.edge-bottom {
    cursor: ns-resize;
}

/* 极致对齐：地图控制按钮统一规范 */
.leaflet-bottom.leaflet-right {
    margin-right: 12px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    /* 合理堆叠：定位在上，缩放在下 */
    gap: 12px !important;
    /* 控件组之间的间距 */
    align-items: flex-end !important;
    z-index: 1000 !important;
}

/* 强制重置 Leaflet 默认控件容器 */
.leaflet-bar,
.custom-locate-control {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    /* 按钮组内部间�?*/
    margin: 0 !important;
}

.map-control-btn,
.leaflet-bar a {
    width: 34px !important;
    height: 34px !important;
    background: #2f3033 !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 6px !important;
    color: #bdc1c6 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-decoration: none !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.map-control-btn:hover,
.leaflet-bar a:hover {
    background: #3c4043 !important;
    color: white !important;
    transform: translateY(-1px);
    border-color: var(--primary) !important;
}

/* 触控适配 */
.leaflet-touch .leaflet-bar a,
.leaflet-touch .map-control-btn {
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
}

.side-panel {
    width: 480px;
    min-width: 446px;
    background: var(--bg-panel);
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    margin-left: -1px;
    /* 消除亚像素填充导致的间隙白条 */
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
    position: relative;
    user-select: none;
}

.side-panel-resizer {
    position: absolute;
    left: -2px;
    /* 跨越边界以便更好拖拽 */
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 1000;
    transition: background 0.2s;
}

.side-panel-resizer:hover,
.side-panel-resizer.active {
    background: rgba(138, 180, 248, 0.4);
    border-left: 2px solid var(--primary);
}

body.resizing {
    cursor: col-resize !important;
}

body.resizing * {
    pointer-events: none !important;
    user-select: none !important;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.panel-header h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.header-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--success);
    transform: scale(1.1);
}

.header-icon-btn.active {
    color: var(--success);
    background: rgba(129, 201, 149, 0.1);
}

.coord-pin-simple {
    background: transparent !important;
    border: none !important;
}

.coord-pin-simple svg {
    display: block;
    width: 18px;
    height: 18px;
}

.panel-body {
    padding: 20px;
    flex: 1;
}

.empty-msg {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
    line-height: 1.6;
    margin-top: 40px;
    opacity: 0.5;
}

#textarea-coords {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: #fff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 10px;
    resize: none;
    outline: none;
    margin-bottom: 12px;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    cursor: text;
}

.data-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--glass-border);
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.data-row label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.data-row span {
    color: var(--primary);
    font-weight: 600;
    font-family: monospace;
    font-size: 0.8125rem;
}

.res-card span {
    color: var(--success);
}

.hidden {
    display: none !important;
}

.map-control-btn.hidden,
.leaflet-bar a.hidden {
    display: none !important;
}

.selection-rectangle {
    border: 1.5px solid var(--primary);
    background: rgba(138, 180, 248, 0.08) !important;
}

.resize-handle-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
}

.resize-handle {
    width: 12px;
    height: 12px;
    background-color: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.resize-handle:hover {
    transform: scale(1.3);
    background-color: var(--primary);
    border-color: white;
}

.leaflet-control-attribution {
    background: transparent !important;
    color: #444 !important;
}

/* 比例尺美化：适配暗色主题 */
.leaflet-control-scale {
    margin-right: 0 !important;
}

.leaflet-control-scale-line {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border) !important;
    border-top: none !important;
    color: var(--success) !important;
    font-family: monospace !important;
    font-size: 10px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px !important;
}

/* 侧边栏按钮化链接 */
.panel-external-links {
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ext-link-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
}

.ext-link-btn span {
    flex: 1;
}

.primary-link {
    background: rgba(138, 180, 248, 0.08);
    color: var(--primary);
}

.primary-link:hover {
    background: rgba(138, 180, 248, 0.15);
    border-color: rgba(138, 180, 248, 0.3);
    transform: translateX(4px);
}

.secondary-link {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.secondary-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.ext-link-btn svg {
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.ext-link-btn:hover svg {
    opacity: 1;
}

/* 导出叠加�?*/
#export-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    text-align: center;
    color: white;
}

/* 进度条容�?*/
.export-progress-wrap {
    margin-top: 20px;
    width: 280px;
}

.export-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
}

.export-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), #a8d1ff);
    transition: width 0.25s ease;
    box-shadow: 0 0 8px rgba(138, 180, 248, 0.5);
}

.export-progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    font-family: monospace;
}


.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}

.cancel-btn {
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: rgba(234, 67, 53, 0.15);
    color: #f28b82;
    border-color: rgba(234, 67, 53, 0.3);
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.panel-footer {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hint-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-muted);
    opacity: 0.6;
}

.hint-item svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--primary);
}

.hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: left;
    opacity: 0.4;
}

.nav-action-btn.side-export-btn {
    width: 100% !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
    padding: 12px 0 !important;
    justify-content: center !important;
    background: linear-gradient(90deg, #d4621a, #c98f10) !important;
    color: #fff5e0 !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(180, 90, 20, 0.3) !important;
    display: none !important;
}

.nav-action-btn.side-export-btn:not(.hidden) {
    display: flex !important;
}

.nav-action-btn.side-export-btn:hover {
    background: linear-gradient(90deg, #ff8c42, #ffd166) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4) !important;
}

/* 快捷键列表样�?*/
.shortcut-list {
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shortcut-item {
    font-size: 0.725rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.shortcut-item span {
    background: var(--bg-input);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    font-family: monospace;
    font-size: 0.7rem;
    border: 1px solid rgba(138, 180, 248, 0.2);
}

/* Toast 提示样式 */

.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 12px 30px;
    border-radius: 99px;
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 5000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.toast-message.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translate(-50%, -40%) scale(0.9);
}

/* 图层管理面板美化 */
/* 图层管理面板高度优化 */
.layer-list-container {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(100vh - 350px);
    background: rgba(20, 20, 25, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding-left: 2px;
    /* 给负值偏移留出空间 */
}

.layer-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-bottom: 0px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background: transparent !important;
    user-select: none;
    border-radius: 0;
    position: relative;
    /* 确保 ::before 定位正确 */
}

.layer-item:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.layer-item.active {
    background: rgba(138, 180, 248, 0.08) !important;
    position: relative;
}

.layer-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--active-color, var(--primary));
    z-index: 10;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--active-color, var(--primary));
}

.layer-item-main {
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0 8px 0 8px;
    cursor: pointer;
}

.layer-visibility-toggle {
    width: 28px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.15;
    transition: all 0.2s;
}

.layer-visibility-toggle.active {
    opacity: 0.9;
    color: var(--text-main);
}

.layer-ps-thumbnail {
    width: 14px;
    height: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    /* 圆形 */
    margin: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.layer-name {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-highlight);
    display: flex;
    /* 改为 flex 布局 */
    align-items: center;
    overflow: hidden;
    padding-right: 8px;
    min-width: 0;
    /* 允许 flex 子元素收缩 */
}

.layer-name .name-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layer-name .point-count {
    flex-shrink: 0;
    /* 强制不被压缩 */
    margin-left: 6px;
    font-size: 0.72rem;
    opacity: 0.55;
    white-space: nowrap;
}

.layer-ps-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.layer-action-icon-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    border: none !important;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.layer-item:hover .layer-action-icon-btn,
.layer-item.active .layer-action-icon-btn {
    opacity: 1;
}

/* 全点吸附按钮激活时常显 */
.layer-action-icon-btn.layer-base-toggle.active {
    opacity: 1 !important;
}

/* 禁用状态的按钮在选中/悬停时仅以极低透明度显示 */
.layer-item:hover .layer-action-icon-btn[disabled],
.layer-item.active .layer-action-icon-btn[disabled] {
    opacity: 0.2 !important;
}

.layer-action-icon-btn:hover {
    color: var(--text-main);
}

.layer-action-icon-btn.active {
    color: var(--primary);
}

.layer-item-subrow {
    padding: 0 8px 6px 48px;
}

.layer-action-btn.active {
    color: var(--primary) !important;
    background: rgba(138, 180, 248, 0.2) !important;
    border-color: rgba(138, 180, 248, 0.3) !important;
}

.layer-item-body {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.opacity-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.opacity-control label {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.opacity-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
}

.opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(138, 180, 248, 0.4);
}

/* 地图反馈 */
#map.drag-over {
    box-shadow: inset 0 0 60px var(--primary);
}

#map.drag-over::after {
    content: '释放文件导入图层';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: rgba(32, 33, 36, 0.9);
    backdrop-filter: blur(10px);
    color: var(--primary);
    padding: 16px 32px;
    border-radius: 40px;
    font-weight: 700;
    border: 1px solid var(--primary);
    pointer-events: none;
}

/* Leaflet 弹窗暗黑模式美化 */
.leaflet-popup-content-wrapper {
    background: rgba(30, 31, 33, 0.9) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px !important;
    color: #e8eaed !important;
    padding: 2px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-tip {
    background: rgba(30, 31, 33, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-content {
    margin: 15px 18px !important;
    line-height: 1.6 !important;
}

.leaflet-popup-close-button {
    color: #9aa0a6 !important;
    padding: 8px 12px 0 0 !important;
}

.leaflet-popup-close-button:hover {
    color: #fff !important;
}

/* 自定义多选按钮样式 */
.custom-checkbox-container {
    display: inline-block;
    position: relative;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.2s;
}

.custom-checkbox-container:hover input~.custom-checkmark {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.custom-checkbox-container input:checked~.custom-checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox-container input:checked~.custom-checkmark:after {
    display: block;
}

/* 点位标注 (Tooltips) 样式与控制 */
.leaflet-tooltip.custom-checkpoint-tooltip {
    display: none;
    /* 默认隐藏 */
    background: rgba(32, 33, 36, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    backdrop-filter: blur(6px);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 3px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    /* 穿透点击以免干扰地图操作 */
}

/* 标注尖角改为深色 */
.leaflet-tooltip-top.custom-checkpoint-tooltip:before {
    border-top-color: rgba(32, 33, 36, 0.85) !important;
}

/* 当开启标签模式时显示 */
.show-layer-labels .leaflet-tooltip.custom-checkpoint-tooltip {
    display: block !important;
}

/* 专业模式路线标签 */
.leaflet-tooltip.pro-route-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    pointer-events: none;
}

.leaflet-tooltip.pro-route-label::before {
    display: none !important;
}


/* 参考图片 Marker 样式 */
.photo-ref-marker div {
    transition: transform 0.2s;
    cursor: pointer;
}

.photo-ref-marker:hover div {
    transform: scale(1.2);
    border-color: var(--primary) !important;
    z-index: 1000;
}

/* 随机抽选按钮颜色 */
.random-btn {
    color: #ffab40 !important;
}

.random-btn:hover {
    background: rgba(255, 171, 64, 0.15) !important;
}

/* 导出按钮颜色 */
.export-btn {
    color: var(--success) !important;
}

.export-btn:hover {
    background: rgba(129, 201, 149, 0.15) !important;
}

/* 激活图层新样式 (指示条) */

.layer-item.active {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.layer-item.active::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 6px;
    background: var(--layer-theme-color, var(--primary));
    border-radius: 10px;
    box-shadow: 0 0 12px var(--layer-theme-color, var(--primary));
    animation: pulse-active 2s infinite;
}

@keyframes pulse-active {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.header-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.header-icon-btn.active {
    background: rgba(56, 56, 56, 0.25) !important;
    /* 深蓝色高亮 */
    color: #8ab4f8 !important;
    border-color: #525252 !important;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}

/* 通用模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    width: 380px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h4 {
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.modal-input-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #f2f2f2;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.modal-input-field:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-btn.primary {
    background: var(--primary);
    color: #1a1b1c;
}

.modal-btn.primary:hover {
    background: #6ea0f7;
    box-shadow: 0 4px 15px rgba(138, 180, 248, 0.2);
    color: #000;
}

.tianditu-token-modal {
    width: 380px;
}

.tianditu-token-tip {
    margin: -4px 0 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.tianditu-token-input-wrap {
    position: relative;
    margin-bottom: 18px;
}

.tianditu-token-input-wrap .modal-input-field {
    padding-right: 46px;
}

.tianditu-token-eye {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tianditu-token-eye:hover,
.tianditu-token-eye.active {
    background: rgba(138, 180, 248, 0.18);
    color: #fff;
}

.tianditu-token-actions {
    justify-content: space-between;
}

/* 透明度角标样式 */
.opacity-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s;
    user-select: none;
    flex-shrink: 0;
}

.opacity-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--primary);
    border-color: var(--primary-dim);
}

.opacity-badge.active {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

/* 透明度弹出层 (PS 风格) */
.opacity-popover {
    position: fixed;
    z-index: 11000;
    /* 高于大部分 UI */
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6);
    min-width: 150px;
    pointer-events: auto;
    animation: popFade 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.15);
}

.opacity-popover.hidden {
    display: none;
}

@keyframes popFade {
    from {
        transform: translateY(8px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.popover-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.8;
}

.popover-value {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
}

/* 自定义滑块样式 */
#popover-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    margin: 8px 0;
}

#popover-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

#popover-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

/* 选中的路线底部统计展示区 (由于移到了框外) */
.layer-stats-footer {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(138, 180, 248, 0.05);
    border: 1px solid rgba(138, 180, 248, 0.15);
    border-radius: 8px;
    font-size: 0.725rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 均匀分布在单行 */
    gap: 12px;
    overflow: hidden;
}

.layer-stats-footer.hidden {
    display: none;
}

.layer-stats-footer span {
    white-space: nowrap;
}

.layer-stats-footer b {
    color: #8ab4f8;
    /* 明确使用亮蓝色 */
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-weight: 700;
    margin-left: 4px;
}

/* 鼠标跟随引导标注样式 */
.mouse-guide-tooltip {
    background: rgba(0, 0, 0, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
    color: #fff !important;
    font-size: 0.7rem !important;
    padding: 2px 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    pointer-events: none !important;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.route-generator-overlay {
    justify-content: flex-end;
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
}

.route-generator-modal {
    width: min(720px, calc(100vw - 28px));
    height: calc(100vh - 28px);
    margin: 14px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    pointer-events: auto;
}

.route-generator-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.route-generator-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.route-generator-close-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.route-generator-close-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.route-generator-steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.route-generator-step {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.route-generator-step.active {
    color: #fff;
    background: rgba(138, 180, 248, 0.14);
    border-color: rgba(138, 180, 248, 0.28);
}

.route-generator-section {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.route-generator-section-title {
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.route-generator-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.route-generator-section-header .route-generator-section-title {
    margin-bottom: 0;
}

.route-generator-selection-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 3fr);
    gap: 8px;
}

.route-generator-selection-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.route-generator-selection-inline,
.route-generator-selection-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.route-generator-selection-card strong {
    color: #fff;
    min-height: 20px;
    line-height: 1.4;
    font-size: 0.95rem;
}

.route-generator-selection-card strong.is-clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 4px;
}

.route-generator-selection-card strong.is-clickable:hover {
    color: #ffd166;
}

.route-generator-selection-card strong.is-required-empty {
    color: #ffb168;
}

.route-generator-selection-inline strong {
    flex: 1;
}

.route-generator-selection-value-row {
    align-items: flex-start;
    min-height: 0;
}

.route-generator-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.route-generator-inline-actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.route-generator-pick-btn,
.route-generator-mini-btn {
    padding: 7px 11px;
    font-size: 0.74rem;
    white-space: nowrap;
}

.route-generator-pick-btn.active {
    border-color: rgba(129, 201, 149, 0.62);
    background: linear-gradient(180deg, rgba(166, 234, 188, 0.92) 0%, rgba(129, 201, 149, 0.82) 100%);
    color: #0b1b0f;
    box-shadow: 0 0 0 1px rgba(129, 201, 149, 0.38), 0 0 14px rgba(129, 201, 149, 0.34), 0 0 28px rgba(129, 201, 149, 0.16);
}

.route-generator-via-value {
    min-height: 18px;
    font-size: 0.82rem;
    line-height: 1.45;
    word-break: break-word;
}

.route-generator-via-chip {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    margin-bottom: 4px;
    padding: 2px 8px;
    border: 1px solid rgba(255, 209, 102, 0.32);
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.08);
    color: #fff;
    font-size: 0.78rem;
    cursor: pointer;
}

.route-generator-via-chip:hover {
    background: rgba(255, 209, 102, 0.18);
    border-color: rgba(255, 209, 102, 0.52);
}

.route-generator-selection-card-header .route-generator-inline-actions {
    margin-left: auto;
}

.route-generator-base-row {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.route-generator-base-info {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.route-generator-rules-section {
    padding-bottom: 10px;
}

.route-generator-rules-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.route-generator-rule-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.route-generator-rule-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

.route-generator-limit-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.route-generator-limit-toggle input {
    width: 12px;
    height: 12px;
    margin: 0;
}

.route-generator-rules-grid input {
    width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.26);
    color: #fff;
    outline: none;
}

.route-generator-input-with-unit {
    position: relative;
}

.route-generator-input-with-unit input {
    padding-right: 26px;
}

.route-generator-input-unit {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.52);
    pointer-events: none;
}

.route-generator-input-with-unit input:disabled + .route-generator-input-unit {
    opacity: 0.45;
}

.route-generator-rules-grid input:focus {
    border-color: rgba(138, 180, 248, 0.4);
}

.route-generator-rules-grid input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.route-generator-rules-grid input[type="number"]::-webkit-outer-spin-button,
.route-generator-rules-grid input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.route-generator-rules-grid input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.route-generator-preview-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.route-generator-status {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.route-generator-progress {
    position: relative;
    height: 4px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.route-generator-progress.hidden {
    display: none;
}

.route-generator-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(129, 201, 149, 0.15) 0%, rgba(138, 180, 248, 0.92) 50%, rgba(129, 201, 149, 0.15) 100%);
    animation: route-generator-progress-slide 1.15s ease-in-out infinite;
}

@keyframes route-generator-progress-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(310%); }
}

.route-generator-progress {
    position: relative;
    height: 4px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.route-generator-progress.hidden {
    display: none;
}

.route-generator-progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 35%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(129, 201, 149, 0.2) 0%, rgba(138, 180, 248, 0.95) 55%, rgba(129, 201, 149, 0.2) 100%);
    animation: route-generator-progress-slide 1.15s ease-in-out infinite;
}

@keyframes route-generator-progress-slide {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(310%);
    }
}

.route-generator-preview-list {
    flex: 1;
    min-height: 260px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
}

.route-generator-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.36);
    font-size: 0.8rem;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.route-generator-preview-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.route-generator-preview-item:hover,
.route-generator-preview-item.active {
    border-color: rgba(138, 180, 248, 0.24);
    background: rgba(138, 180, 248, 0.08);
}

.route-generator-preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.route-generator-preview-seq {
    font-size: 0.84rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.route-generator-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.route-generator-preview-meta b {
    color: var(--primary);
    margin-left: 4px;
}

.route-generator-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.route-generator-actions {
    margin-top: 0;
}

.leaflet-tooltip.route-generator-id-tooltip {
    background: rgba(8, 12, 18, 0.88) !important;
    border: 1px solid rgba(129, 201, 149, 0.38) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 2px 7px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
}

.leaflet-tooltip-top.route-generator-id-tooltip:before,
.leaflet-tooltip-bottom.route-generator-id-tooltip:before,
.leaflet-tooltip-left.route-generator-id-tooltip:before,
.leaflet-tooltip-right.route-generator-id-tooltip:before {
    display: none !important;
}

@media (max-width: 768px) {
    .route-generator-modal {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        margin: 8px;
        padding: 18px;
    }

    .route-generator-selection-grid,
    .route-generator-rules-grid {
        grid-template-columns: 1fr;
    }

    .route-generator-selection-inline,
    .route-generator-selection-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .route-generator-base-row {
        justify-content: flex-start;
    }
}

.mouse-guide-tooltip:before {
    display: none !important;
}
