/**
 * ROS Web 组件样式
 * 定义各个 UI 组件的样式
 */

/* ==================== 右侧顶栏：模式 + 图层 ==================== */
.control-panel-topbar {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
    z-index: 60;
}

/* 右栏工具弹层：与「图层」同位置（顶栏下、栏宽内） */
.rail-dock-overlay {
    position: fixed;
    inset: 0;
    z-index: 12040;
    pointer-events: none;
    background: transparent;
}

.rail-dock-panel {
    pointer-events: auto !important;
    box-sizing: border-box !important;
    padding: 12px !important;
    border-radius: var(--border-radius) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    background: rgba(22, 24, 28, 0.96) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(10px);
    /* 高度由 dockPanelToRightRail 的 inline max-height 约束；此处必须可滚动，否则平板下半截被挡 */
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    color: var(--text-primary, #eee);
    font-size: 12px;
}

.tw-panel.rail-dock-panel {
    display: flex !important;
    flex-direction: column;
    min-height: 0;
}

.control-panel-topbar .mode-switch {
    flex: 1;
    min-width: 0;
}

.layer-popover-btn {
    flex: 0 0 auto;
    min-width: 56px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-full);
    background: var(--bg-panel);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.layer-popover-btn:hover,
.layer-popover-btn[aria-expanded="true"] {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(78, 205, 196, 0.10);
}

.layer-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 80;
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(22, 24, 28, 0.96);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.layer-popover[hidden] {
    display: none !important;
}

.layer-popover__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.layer-popover__close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.layer-popover__close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ==================== 模式切换 ==================== */
.mode-switch {
    display: flex;
    background-color: var(--bg-panel);
    border-radius: var(--border-radius-full);
    padding: var(--spacing-xs);
    overflow: hidden;
}

.mode-btn {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--border-radius-full) - 2px);
    transition: all var(--transition-normal);
}

.mode-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.mode-btn:hover:not(.active) {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

/* ==================== 卡片 ==================== */
.card {
    background-color: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-toggle-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.card-toggle-btn svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.card-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.display-options-body {
    display: block;
}

/* ==================== 状态指示器 ==================== */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--warning);
    transition: background-color var(--transition-fast);
}

.status-dot.connected {
    background-color: var(--success);
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background-color: var(--error);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== 机器人状态 ==================== */
.robot-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.robot-status-pose {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.robot-status-meta {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--spacing-sm);
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.status-item {
    text-align: center;
    min-width: 0;
}

.status-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.status-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.25;
}

/* 右栏密度对齐 2D：覆盖通用大字号 */
.control-panel .card-title {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.control-panel .status-value {
    font-size: 12px;
}

.control-panel .launch-stack-actions--grid .robot-quick-action-btn,
.control-panel .robot-quick-action-btn {
    padding: 8px 8px;
    font-size: 12px;
    border-radius: 10px;
    min-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.robot-status-card-head.robot-status-card-head {
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: 0;
}

#robot-status-card:not(.robot-status-card--collapsed) .robot-status-card-head {
    margin-bottom: var(--spacing-sm);
}

.robot-status-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
}

.robot-status-strip__label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.robot-status-strip #robot-task-status {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    min-width: 0;
    flex: 0 1 auto;
}

.robot-status-strip__sep {
    flex-shrink: 0;
    color: var(--text-secondary);
    opacity: 0.5;
}

.robot-status-strip__bat {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

.robot-status-strip #robot-task-status.is-charging,
.robot-status-strip__bat--charging {
    color: #3ee0c4;
}

.robot-status-card-head-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
}

.robot-status-card-head-actions .status-indicator {
    white-space: nowrap;
    gap: 4px;
}

/* 窄右栏：连接文案让位给「未定位 · 90%」，只保留色点 */
.control-panel .robot-status-card-head {
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
}

.control-panel .robot-status-card-head-actions .status-text {
    display: none;
}

.control-panel .robot-status-strip__label {
    font-size: 11px;
}

.control-panel .robot-status-strip #robot-task-status,
.control-panel .robot-status-strip__bat {
    font-size: 12px;
}

#robot-status-card.robot-status-card--collapsed {
    padding: 10px 12px;
}

#robot-status-card.robot-status-card--collapsed .robot-status-card-body {
    display: none;
}

#robot-status-card.robot-status-card--collapsed .robot-status-card-head {
    margin-bottom: 0;
}

/* 收起时只保留色点，避免与任务状态文案重复 */
#robot-status-card.robot-status-card--collapsed .robot-status-card-head-actions .status-text {
    display: none;
}

#robot-status-panel-toggle svg {
    transition: transform var(--transition-fast);
}

#robot-status-card.robot-status-card--collapsed #robot-status-panel-toggle svg {
    transform: rotate(180deg);
}

.robot-status .status-item-span-full {
    grid-column: 1 / -1;
}

#robot-status-map-slot {
    min-width: 0;
}

.status-value-compact {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    word-break: break-word;
}

.robot-status-circuit-telemetry {
    display: none !important;
}

.status-value-inline {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.robot-status-card-head-actions .status-text {
    max-width: 5.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== 显示选项 ==================== */
.display-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: var(--spacing-sm);
}

.option-btn {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: normal;
    word-break: break-word;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.option-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-dark);
}

/* C12：顶栏两路流开关（#c12-btn-visible / #c12-btn-thermal，沿用 .toolbar-btn.active） */
.toolbar-btn.c12-toolbar-stream {
    min-width: 52px;
    padding: var(--spacing-sm) var(--spacing-xs);
}


/* ==================== 顶部工具栏：可折叠分组 ==================== */
.toolbar-collapsible-section {
    display: flex;
    align-items: center;
    gap: 0;
}

.toolbar-section-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
}

.toolbar-section-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast);
}

.toolbar-section-toggle:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.toolbar-collapsible-section.collapsed .toolbar-section-toggle svg {
    transform: rotate(180deg);
}

/* 展开时须 overflow:visible，否则禁行区/特殊区域等 .toolbar-dropdown-panel 会被裁切，表现为点击无反应 */
.toolbar-section-body {
    display: flex;
    gap: var(--spacing-xs);
    overflow: visible;
    transition: max-width 0.3s ease, opacity 0.2s ease;
    max-width: 1200px;
    opacity: 1;
}

.toolbar-collapsible-section.collapsed .toolbar-section-body {
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    gap: 0;
    pointer-events: none;
}

/* 紧凑顶栏：保留短注释，缩小间距；系统项收入「系统」下拉 */
.toolbar--compact {
    gap: 4px;
    padding: 4px 8px;
}

.toolbar--compact .toolbar-group {
    gap: 2px;
}

.toolbar--compact .toolbar-btn {
    min-width: 48px;
    padding: 4px 6px;
    font-size: 10px;
    gap: 1px;
    line-height: 1.15;
}

.toolbar--compact .toolbar-btn > span:not(.toolbar-dropdown-trigger-row) {
    display: block;
    max-width: 4.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toolbar--compact .toolbar-btn svg {
    width: 18px;
    height: 18px;
}

.toolbar--compact .toolbar-dropdown-trigger .toolbar-dropdown-main-icon {
    width: 18px;
    height: 18px;
}

.toolbar--compact .toolbar-dropdown-trigger .toolbar-dropdown-chevron {
    width: 10px;
    height: 10px;
}

.toolbar--compact .toolbar-section-toggle {
    width: 20px;
    height: 32px;
}

.toolbar--compact .toolbar-divider {
    height: 28px;
    margin: 0 2px;
}

.toolbar-dropdown-panel .toolbar-dropdown-item.active {
    background-color: rgba(78, 205, 196, 0.16);
    color: var(--primary-color);
}

/* ==================== 右侧面板：快捷启动栈（可折叠卡片） ==================== */
.launch-stack-card__label {
    color: var(--text-primary);
    font-weight: 500;
}

.launch-stack-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

#launch-stack-card.launch-stack-card--collapsed .launch-stack-card__head {
    margin-bottom: 0;
}

#launch-stack-card.launch-stack-card--collapsed .launch-stack-card__body {
    display: none;
}

#launch-stack-collapse-btn svg {
    transition: transform var(--transition-fast);
}

#launch-stack-card.launch-stack-card--collapsed #launch-stack-collapse-btn svg {
    transform: rotate(180deg);
}

#switch-floor-btn {
    grid-column: 2;
}

.nav-floor-switch-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 132px;
    overflow: auto;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.nav-floor-switch-panel[hidden] {
    display: none;
}

.nav-floor-chip {
    appearance: none;
    border: 1px solid rgba(78, 205, 196, 0.35);
    background: rgba(78, 205, 196, 0.08);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

.nav-floor-chip.is-active {
    background: var(--primary-color, #4ecdc4);
    border-color: var(--primary-color, #4ecdc4);
    color: #102422;
    font-weight: 600;
}

/* 右侧面板内卡片：统一边线与悬浮阴影（对齐 2D） */
.control-panel .card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.launch-stack-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.launch-stack-actions--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.launch-stack-actions--grid .robot-quick-action-btn {
    padding: 8px 8px;
    font-size: 12px;
    border-radius: 10px;
}

.lc-loc-profile-tip {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.lc-loc-profile-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.lc-loc-profile-option:hover {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(96, 165, 250, 0.08);
}

.lc-loc-profile-option:has(input:checked) {
    border-color: rgba(96, 165, 250, 0.75);
    background: rgba(96, 165, 250, 0.12);
}

.lc-loc-profile-option input {
    margin-top: 3px;
    flex: 0 0 auto;
}

.lc-loc-profile-option__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.lc-loc-profile-option__body strong {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.lc-loc-profile-option__body small {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.58);
}

.robot-quick-action-btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 8px;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition:
        filter var(--transition-fast),
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.robot-quick-action-btn:hover:not(:disabled) {
    filter: brightness(1.06);
}

.robot-quick-action-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.robot-quick-action-btn:disabled,
.robot-quick-action-btn--muted {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

.robot-quick-action-btn--primary {
    background: linear-gradient(180deg, #5ed4c9 0%, var(--primary-color) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.robot-quick-action-btn--neutral {
    background: #333333;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f5f5f5;
}

.robot-quick-action-btn--go2 {
    background: linear-gradient(180deg, #8fd94a 0%, #76c72d 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #1a1a1a;
}

.robot-quick-action-btn--danger {
    background: linear-gradient(180deg, #f06a6a 0%, var(--error) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}


/* ==================== 启动/停止按钮 ==================== */
.launch-controls {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.launch-btn {
    flex: 1;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.launch-btn.primary {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.launch-btn.primary:hover {
    background-color: var(--primary-hover);
}

.launch-btn.danger {
    background-color: var(--error);
    color: white;
}

.launch-btn.danger:hover {
    background-color: #e55555;
}

.launch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ==================== 通知/提示 ==================== */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-bar-clearance, 64px) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--bg-panel);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 22000;
    opacity: 0;
    transition: all var(--transition-normal);
    pointer-events: none;
    max-width: min(92vw, 520px);
}

/* showMessage 动态提示条 + 定位反馈浮层：避免被右侧栏/底栏遮挡 */
.message,
.message-info,
.message-success,
.message-warning,
.message-error {
    position: fixed !important;
    top: calc(var(--topbar-height, 52px) + 10px) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    z-index: 22000 !important;
    max-width: min(92vw, 520px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

#localization-feedback-modal > div {
    z-index: 22000 !important;
    top: calc(var(--topbar-height, 52px) + 10px) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: min(360px, calc(100vw - 32px)) !important;
    max-width: min(92vw, 520px) !important;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* ==================== 工具栏 ==================== */
.toolbar {
    position: absolute;
    top: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background-color: var(--bg-panel);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 100;
}

/* 底侧栏：覆盖上方悬浮胶囊定位，贴地图列底边全宽 */
.toolbar.toolbar--bottom,
.toolbar.toolbar--bottom.app-bottom-dock {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 0;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
}

.localization-status-bar {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 10px;
    border-radius: 6px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    cursor: default;
}

.localization-status-bar--progress {
    background: rgba(245, 158, 11, 0.92);
}

.toolbar-group {
    display: flex;
    gap: var(--spacing-xs);
}

.toolbar-dropdown {
    position: relative;
    display: flex;
}

.toolbar-dropdown-trigger .toolbar-dropdown-trigger-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.toolbar-dropdown-trigger .toolbar-dropdown-main-icon {
    width: 20px;
    height: 20px;
}

.toolbar-dropdown-trigger .toolbar-dropdown-chevron {
    width: 11px;
    height: 11px;
    opacity: 0.75;
    flex-shrink: 0;
}

.toolbar-dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 158px;
    padding: var(--spacing-xs);
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 120;
}

.toolbar-dropdown-panel .toolbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.toolbar-dropdown-panel .toolbar-dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.toolbar-dropdown-panel .toolbar-dropdown-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.toolbar-dropdown-panel .toolbar-dropdown-item--danger {
    color: var(--error);
}

.toolbar-dropdown-panel .toolbar-dropdown-item--danger:hover {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

.toolbar-divider {
    width: 1px;
    height: 32px;
    background-color: var(--border-color);
    margin: 0 var(--spacing-xs);
}

.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    min-width: 56px;
}

.toolbar-btn svg {
    width: 20px;
    height: 20px;
}

.toolbar-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.toolbar-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.toolbar-btn:active {
    transform: none;
    opacity: 0.88;
}

.toolbar-btn.tool.active {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3);
}

.toolbar-tool-cancel {
    display: none;
    margin-left: 4px;
    border: 1px solid rgba(255, 120, 120, 0.45);
    color: #ffb4b4;
    background: rgba(72, 22, 22, 0.55);
}

.toolbar-tool-cancel.is-visible {
    display: flex;
}

.toolbar-tool-cancel:hover {
    background: rgba(120, 32, 32, 0.75);
    color: #fff;
}

.toolbar-btn.view.active {
    background-color: var(--bg-hover);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.toolbar-btn:not(:has(span)) {
    min-width: 40px;
    padding: var(--spacing-sm);
}

/* ==================== 键盘快捷键提示 ==================== */
.keyboard-hint {
    position: fixed;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    background-color: var(--bg-panel);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
    z-index: 50;
}

.keyboard-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background-color: var(--bg-hover);
    border-radius: 4px;
    font-family: monospace;
    margin: 0 2px;
}


/* ==================== 启动控制容器 ==================== */
.launch-control-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* ==================== 启动/停止按钮 ==================== */
.launch-controls {
    display: flex;
    gap: var(--spacing-sm);
}

.launch-btn {
    flex: 1;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.launch-btn.primary {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.launch-btn.primary:hover {
    background-color: var(--primary-hover);
}

.launch-btn.danger {
    background-color: var(--error);
    color: white;
}

.launch-btn.danger:hover {
    background-color: #e55555;
}

.launch-btn.success {
    background-color: #52c41a;
    color: white;
}

.launch-btn.success:hover {
    background-color: #73d13d;
}

.launch-btn.warning {
    background-color: var(--warning);
    color: var(--bg-dark);
}

.launch-btn.warning:hover {
    background-color: #ffe066;
}

.launch-btn.secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.launch-btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.launch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.launch-btn:disabled:hover {
    opacity: 0.5;
}

/* 建图侧栏：分段标题（与 launch-controls 同主题） */
.launch-section-label {
    margin: var(--spacing-md) 0 var(--spacing-xs) 0;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

#mapping-controls .launch-section-label {
    margin: 12px 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
}
#mapping-controls .launch-section-label:first-of-type {
    margin-top: 14px;
}
#mapping-controls .lc-bag-offline-row {
    margin-bottom: 8px;
}
#mapping-controls .lc-bag-selected-hint {
    margin-top: 8px;
}

.lc-bag-selected-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    line-height: 1.4;
    padding: 0 var(--spacing-xs);
}

.lc-bag-selected-hint.has-file {
    color: var(--text-secondary);
}

.lc-bag-offline-row {
    margin-bottom: 0;
}

.lc-bag-play-rate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.lc-bag-play-rate__select {
    min-width: 72px;
    padding: 4px 8px;
    border-radius: var(--radius-sm, 4px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    background: var(--surface-elevated, rgba(0, 0, 0, 0.25));
    color: var(--text-primary, inherit);
    font-size: 12px;
}

.lc-bag-play-rate__select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Bag 选择弹窗 */
.lc-bag-modal {
    max-width: 560px;
}

.lc-bag-picker-toolbar {
    margin-bottom: var(--spacing-sm);
}

.lc-bag-folder-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--spacing-sm);
}

.lc-bag-toolbar-hint {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    min-width: 160px;
    line-height: 1.4;
}

.lc-bag-pick-folder {
    cursor: pointer;
}

.lc-bag-pick-with-cb {
    cursor: pointer;
}

.lc-bag-row-cb {
    flex: 0 0 auto;
    align-self: center;
    margin-left: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.lc-bag-modal-body {
    padding-top: var(--spacing-md);
}

.lc-bag-modal-tip {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.5;
}

.lc-bag-pick-list {
    max-height: min(48vh, 360px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.lc-bag-pick-empty {
    text-align: center;
    padding: var(--spacing-xl);
    font-size: 13px;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-card);
}

.lc-bag-pick-item {
    display: flex;
    align-items: stretch;
    gap: var(--spacing-sm);
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.lc-bag-pick-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.lc-bag-pick-item.is-selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
    background: var(--bg-hover);
}

.lc-bag-pick-item-main {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.lc-bag-pick-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.lc-bag-pick-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.lc-bag-pick-incomplete .lc-bag-pick-name {
    color: var(--text-muted);
}

.lc-bag-pick-incomplete-badge {
    font-size: 11px;
    font-weight: 600;
    color: #c9a227;
    margin-left: 6px;
    white-space: nowrap;
}

.lc-bag-pick-del.launch-btn {
    flex: 0 0 auto;
    align-self: center;
    margin: 4px 8px 4px 0;
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

/* ==================== 通用弹窗 (Modal) ==================== */
.lc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lc-fade-in 0.2s ease;
}

@keyframes lc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lc-modal {
    background-color: var(--bg-panel);
    border-radius: var(--border-radius);
    width: 92%;
    max-width: 460px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: lc-slide-up 0.25s ease;
}

@keyframes lc-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.lc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
}

.lc-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.lc-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
}

.lc-modal-close:hover {
    color: var(--text-primary);
}

.lc-modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
}

.lc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

/* 弹窗内表单 */
.lc-form-group {
    margin-bottom: var(--spacing-lg);
}

.lc-form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.lc-form-input,
.lc-form-select {
    width: 100%;
    padding: 10px var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.lc-form-input::placeholder {
    color: var(--text-muted);
}

.lc-form-input:focus,
.lc-form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.lc-form-input.error {
    border-color: var(--error);
}

/* 弹窗按钮 */
.lc-btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.lc-btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.lc-btn-primary:hover {
    background-color: var(--primary-hover);
}

.lc-btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.lc-btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* 地图选择列表项 */
.lc-map-item {
    display: flex;
    align-items: center;
    padding: 12px var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.lc-map-item:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-hover);
}

.lc-map-item input[type="radio"] {
    accent-color: var(--primary-color);
    margin-right: 10px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lc-map-item-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.lc-map-item-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
    padding-left: 12px;
}

.lc-btn-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    line-height: 1;
}

.lc-btn-delete:hover {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.15);
}

.lc-empty-state {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==================== 速度显示 + 方向盘组合 ==================== */

/* 速度控制容器 */
.speed-control {
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* 紧凑速度读数（替代原大块 speed-box） */
.speed-readout {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    padding: 2px 6px 0;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.2;
    user-select: none;
}

.speed-readout__item {
    white-space: nowrap;
}

.speed-readout__unit {
    margin-left: 2px;
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.42);
}

.speed-readout__sep {
    color: rgba(255, 255, 255, 0.28);
    font-weight: 400;
}

/* 兼容旧版速度盒（其它页面若仍引用） */
.data-panel {
    display: flex;
    justify-content: center;
    gap: 18px;
    position: relative;
    z-index: 1;
    height: 140px;
}

.speed-box {
    width: 155px;
    height: 100%;
    position: relative;
}

.speed-box-bg {
    width: 100%;
    height: 100%;
}

.speed-box-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
}

.speed-box.right .speed-box-content {
    text-align: right;
}

.speed-box .speed-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.speed-box .speed-value {
    font-size: 22px;
    font-weight: 300;
    color: #fff;
    line-height: 1;
}

.speed-box .speed-unit {
    font-size: 16px;
    color: #888;
    margin-top: 8px;
}

/* 方向盘 / 摇杆容器 */
.wheel-container {
    display: flex;
    justify-content: center;
    margin-top: 0;
    position: relative;
    z-index: 2;
}

.wheel-wrapper {
    position: relative;
    width: 112px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 虚拟摇杆：外圈透明底盘 + 内圈拖杆 */
.joystick-pad {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.joystick-base {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.joystick-base.active {
    border-color: rgba(var(--primary-rgb, 59, 130, 246), 0.55);
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.08);
}

.joystick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle at 35% 30%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(200, 200, 200, 0.85) 45%,
        rgba(120, 120, 120, 0.9) 100%
    );
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        inset 0 -2px 6px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    will-change: transform;
}

.joystick-base.active .joystick-knob {
    border-color: rgba(var(--primary-rgb, 59, 130, 246), 0.6);
    box-shadow:
        0 4px 14px rgba(var(--primary-rgb, 59, 130, 246), 0.35),
        inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

/* 兼容旧版方向键样式（若其它页面仍引用） */
.wheel-svg {
    width: 100%;
    height: 100%;
}

.direction-btn {
    position: absolute;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: color 0.15s ease;
}

.direction-btn:hover {
    color: #ddd;
}

.direction-btn:active,
.direction-btn.pressing {
    color: var(--primary-color);
}

.direction-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.btn-up {
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 44px;
}

.btn-down {
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 44px;
}

.btn-left {
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 50px;
}

.btn-right {
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 50px;
}

/* 速度卡片内：紧凑读数 + 缩小双摇杆 */
#velocity-control-card {
    padding: 6px 8px !important;
}

#velocity-control-card .speed-readout {
    font-size: 11px;
    gap: 5px;
    padding: 0 2px;
}

#velocity-control-card .speed-readout__unit {
    font-size: 9px;
}

#velocity-control-card .wheel-container {
    margin-top: 0;
}

#velocity-control-card .wheel-wrapper {
    width: 108px;
    height: 108px;
}

#velocity-control-card .joystick-base {
    width: 100px;
    height: 100px;
}

#velocity-control-card .joystick-knob {
    width: 36px;
    height: 36px;
}

#velocity-control-card .direction-btn svg {
    width: 20px;
    height: 20px;
}

#velocity-control-card .btn-up {
    top: 2px;
    width: 40px;
    height: 32px;
}

#velocity-control-card .btn-down {
    bottom: 2px;
    width: 40px;
    height: 32px;
}

#velocity-control-card .btn-left {
    left: 2px;
    width: 32px;
    height: 40px;
}

#velocity-control-card .btn-right {
    right: 2px;
    width: 32px;
    height: 40px;
}

/* C12 云台（与速度/方向盘卡片并排） */
.velocity-gimbal-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}

.c12-gimbal-sidebar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0 0 2px 0;
}

.c12-gimbal-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.06em;
    user-select: none;
}

.c12-ptz-joystick-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#velocity-control-card .c12-ptz-joystick-base {
    width: 100px;
    height: 100px;
}

#velocity-control-card .c12-ptz-joystick-knob {
    width: 36px;
    height: 36px;
}

.toolbar-btn.danger {
    color: var(--error);
}

.toolbar-btn.danger:hover {
    background-color: var(--error);
    color: white;
}

/* ==================== 任务监控（右侧栏嵌入） ==================== */

.task-monitor-toolbar-badge,
.tm-rail-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    background: #52c41a;
    color: white;
    line-height: 1.2;
    animation: tm-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes tm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 右栏任务卡片：取消浮窗定位；平板需内部可滚，避免底栏遮挡 */
.control-panel .tm-rail-card,
.control-panel #tm-float-panel.tm-rail-card,
#tm-float-panel.tm-rail-card {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: none !important;
    z-index: auto !important;
    transform: none !important;
    box-shadow: none;
    backdrop-filter: none;
    overflow: hidden;
    flex: 1 1 auto;
    /* 覆盖 .control-panel > * { flex-shrink:0 }，否则任务区撑破视口无法滑动 */
    flex-shrink: 1 !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.control-panel .tm-rail-card.has-task {
    border-color: rgba(78, 205, 196, 0.35);
}

.tm-rail-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.tm-rail-card__head .tm-float-title,
#tm-float-panel.tm-rail-card .tm-float-title {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #eee);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0;
}

.control-panel .tm-rail-card .tm-float-body,
#tm-float-panel.tm-rail-card .tm-float-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
}

.control-panel .tm-rail-card .tm-float-body::-webkit-scrollbar,
#tm-float-panel.tm-rail-card .tm-float-body::-webkit-scrollbar {
    width: 6px;
}

.control-panel .tm-rail-card .tm-float-body::-webkit-scrollbar-thumb,
#tm-float-panel.tm-rail-card .tm-float-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 4px;
}

.tm-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tm-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-dark, #0f0f23);
    border-radius: 3px;
    overflow: hidden;
}

.tm-progress-fill {
    height: 100%;
    background: var(--primary-color, #4ecdc4);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.tm-progress-text {
    font-size: 11px;
    color: var(--text-secondary, #aaa);
    min-width: 32px;
    text-align: right;
}

.tm-status {
    font-size: 12px;
    color: var(--text-secondary, #aaa);
    margin-bottom: 8px;
    line-height: 1.4;
}

.tm-points-list {
    /* 路点列表不再单独限高嵌套滚动；整块 tm-float-body 统一滑动，避免平板嵌套滚不动 */
    max-height: none;
    overflow: visible;
    margin-bottom: 8px;
    flex: 0 0 auto;
    min-height: 0;
}

.control-panel .tm-rail-card .tm-points-list {
    max-height: none;
}

.control-panel .tm-rail-card .tm-controls,
.control-panel .tm-rail-card .tm-empty {
    flex-shrink: 0;
}

.tm-point {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
}

.tm-point.current {
    background: rgba(78, 205, 196, 0.15);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.tm-point-icon {
    font-size: 12px;
    width: 18px;
    text-align: center;
}

.tm-point-name {
    flex: 1;
    color: var(--text-primary, #eee);
}

.tm-point-type {
    font-size: 10px;
    color: var(--text-secondary, #aaa);
    padding: 1px 4px;
    background: var(--bg-dark, #0f0f23);
    border-radius: 3px;
}

.tm-controls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tm-ctrl-btn {
    flex: 1;
    min-width: 50px;
    padding: 5px 8px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.tm-ctrl-btn.tm-pause { background: var(--warning, #f0c040); color: var(--bg-dark, #0f0f23); }
.tm-ctrl-btn.tm-resume { background: #52c41a; color: white; }
.tm-ctrl-btn.tm-skip { background: var(--bg-dark, #0f0f23); color: var(--text-primary, #eee); border: 1px solid var(--border-color, #333); }
.tm-ctrl-btn.tm-abort { background: var(--error, #ff6b6b); color: white; }
.tm-ctrl-btn:hover { opacity: 0.85; }

.tm-empty {
    font-size: 12px;
    color: var(--text-secondary, #aaa);
    text-align: center;
    padding: 16px 0;
}

.tm-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 12px 0;
}

/* ==================== 2D/3D Web 切换弹窗 ==================== */
.rw-switch-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    align-items: center;
    justify-content: center;
}
.rw-switch-modal.show {
    display: flex;
}
.rw-switch-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.rw-switch-modal__panel {
    position: relative;
    width: min(92vw, 400px);
    background: var(--bg-panel, #1e1e2e);
    border: 1px solid var(--border-color, #333);
    border-radius: var(--border-radius-md, 8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.rw-switch-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color, #333);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary, #eee);
}
.rw-switch-modal__close {
    border: none;
    background: transparent;
    color: var(--text-secondary, #aaa);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.rw-switch-modal__close:hover {
    color: var(--text-primary, #fff);
}
.rw-switch-modal__body {
    padding: 16px;
}
.rw-switch-modal__hint {
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    margin: 0 0 12px;
    line-height: 1.45;
}
.rw-switch-modal__label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary, #aaa);
    margin-bottom: 6px;
}
.rw-switch-modal__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm, 4px);
    border: 1px solid var(--border-color, #444);
    background: var(--bg-dark, #12121c);
    color: var(--text-primary, #eee);
    font-size: 14px;
}
.rw-switch-modal__error {
    color: var(--error, #ff6b6b);
    font-size: 13px;
    margin: 10px 0 0;
}
.rw-switch-modal__warn {
    font-size: 12px;
    color: var(--warning, #f0c040);
    margin: 10px 0 0;
    line-height: 1.45;
    display: none;
}
.rw-switch-modal__footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 16px 16px;
}

.rw-charging-return-panel {
    width: min(94vw, 440px);
    max-height: min(82vh, 560px);
    display: flex;
    flex-direction: column;
}

/* 一键回充：停靠右栏时取消全屏居中 */
#charging-return-modal.rail-docked.show {
    display: block;
    inset: auto;
    align-items: stretch;
    justify-content: flex-start;
    pointer-events: none;
    z-index: 12040;
}
#charging-return-modal.rail-docked > .rw-switch-modal__backdrop {
    display: none;
}
#charging-return-modal.rail-docked > .rw-charging-return-panel.rail-dock-panel {
    pointer-events: auto;
    width: auto !important;
    /* 勿用 max-height:inherit !important，会覆盖 JS 视口高度，导致平板无法滚动 */
    display: flex !important;
    flex-direction: column;
    min-height: 0;
}
#charging-return-modal.rail-docked .rw-switch-modal__header {
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
    font-size: 13px;
}
#charging-return-modal.rail-docked .rw-switch-modal__body {
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#charging-return-modal.rail-docked .rw-switch-modal__footer {
    padding: 10px 0 0;
    flex-shrink: 0;
}
#charging-return-modal.rail-docked .rw-switch-modal__hint {
    font-size: 11px;
    margin-bottom: 8px;
    flex-shrink: 0;
}
#charging-return-modal.rail-docked .rw-charging-return-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 任务路点向导：右栏紧凑面板 */
.tw-panel {
    color: #e0e0e0;
    font-size: 12px;
}
.tw-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.tw-panel__title {
    font-size: 13px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tw-panel__close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.tw-panel__close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.tw-panel__hint {
    margin: 0 0 8px;
    color: #aaa;
    line-height: 1.4;
    font-size: 11px;
}
.tw-panel__hint--accent {
    color: #9cf;
}
.tw-panel__hint--sm {
    font-size: 11px;
    color: #bbb;
}
.tw-panel__meta {
    margin-bottom: 6px;
    font-size: 11px;
    color: #888;
}
.tw-panel__warn {
    margin-bottom: 8px;
    font-size: 11px;
    color: #f5a623;
    line-height: 1.4;
}
.tw-panel__label {
    display: block;
    margin: 8px 0 4px;
    color: #aaa;
    font-size: 11px;
}
.tw-panel__input,
.tw-panel__select {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #2a2a2a;
    color: #fff;
    font-size: 12px;
    margin-bottom: 4px;
}
.tw-panel__check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    color: #bbb;
    font-size: 11px;
    cursor: pointer;
}
.tw-panel__list {
    max-height: min(28vh, 200px);
    overflow: auto;
    background: #2a2a2a;
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 10px;
}
.tw-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}
.tw-panel__btn {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #666;
    background: #333;
    color: #ddd;
    cursor: pointer;
    font-size: 12px;
}
.tw-panel__btn--primary {
    border: none;
    background: #4ecdc4;
    color: #111;
    font-weight: 600;
}
.rw-charging-return-panel .rw-switch-modal__body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.rw-charging-return-list {
    overflow-y: auto;
    max-height: min(50vh, 360px);
    margin-top: 8px;
    border: 1px solid var(--border-color, #333);
    border-radius: var(--border-radius-sm, 4px);
    background: var(--bg-dark, #12121c);
}
.rw-charging-return-loading,
.rw-charging-return-empty {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    text-align: center;
}
.rw-charging-return-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #2a2a3a);
}
.rw-charging-return-row:last-child {
    border-bottom: none;
}
.rw-charging-return-meta {
    min-width: 0;
    flex: 1;
}
.rw-charging-return-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary, #eee);
}
.rw-charging-return-sub {
    font-size: 12px;
    color: var(--text-secondary, #999);
    margin-top: 4px;
    word-break: break-all;
}
.rw-charging-return-go {
    flex-shrink: 0;
    white-space: nowrap;
}

.rw-modal--canvas-pass-through.rw-switch-modal.show {
    pointer-events: none;
}
.rw-modal--canvas-pass-through > .rw-switch-modal__backdrop {
    pointer-events: none;
}
.rw-modal--canvas-pass-through > .rw-switch-modal__panel {
    pointer-events: auto;
}

/* ==================== 导航打点浮窗 ==================== */
.nmw-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding:
        calc(72px + env(safe-area-inset-top, 0px))
        calc(16px + env(safe-area-inset-right, 0px))
        calc(16px + env(safe-area-inset-bottom, 0px))
        calc(16px + env(safe-area-inset-left, 0px));
    background: transparent;
    pointer-events: none;
    box-sizing: border-box;
}

.nmw-panel {
    pointer-events: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(400px, 100%);
    min-width: 0;
    max-width: 400px;
    max-height: calc(100vh - 88px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 16px 18px;
    color: #e0e0e0;
    font-size: 13px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    box-sizing: border-box;
}

.nmw-panel.nmw-panel--rail-docked,
.nmw-panel.rail-dock-panel {
    width: auto !important;
    max-width: none !important;
    /* 高度约束交给 dockPanelToRightRail 的 max-height，保留内部 body 滚动 */
    padding: 12px !important;
    font-size: 12px;
    display: flex !important;
    flex-direction: column;
    min-height: 0;
    overflow: hidden !important;
}
.nmw-panel.nmw-panel--rail-docked .nmw-panel__header,
.nmw-panel.rail-dock-panel .nmw-panel__header {
    cursor: default;
    touch-action: auto;
    margin-bottom: 8px;
}
.nmw-panel.nmw-panel--rail-docked .nmw-panel__title,
.nmw-panel.rail-dock-panel .nmw-panel__title {
    font-size: 13px;
}
.nmw-panel.nmw-panel--rail-docked .nmw-hint,
.nmw-panel.rail-dock-panel .nmw-hint {
    font-size: 11px;
}

.nmw-panel.nmw-panel--dragging {
    position: fixed;
    margin: 0;
    z-index: 12001;
}

.nmw-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: move;
    user-select: none;
    touch-action: none;
    flex-shrink: 0;
    gap: 8px;
}

.nmw-panel__title {
    font-size: 15px;
    font-weight: 600;
}

.nmw-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.nmw-panel__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
    padding-right: 2px;
    scrollbar-width: thin;
}

.nmw-hint {
    margin: 0 0 10px;
    color: #aaa;
    line-height: 1.45;
}

.nmw-meta-row {
    margin-bottom: 6px;
}

.nmw-meta-label {
    color: #888;
}

.nmw-map-resolve {
    margin-bottom: 8px;
    font-size: 12px;
    color: #f5a623;
    line-height: 1.4;
}

.nmw-pose-box {
    background: #252525;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.6;
}

.nmw-pose-label {
    color: #888;
    margin-bottom: 4px;
}

.nmw-field-label {
    display: block;
    margin: 0 0 4px;
    color: #aaa;
}

.nmw-input,
.nmw-select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #252525;
    color: #e8e8e8;
    margin-bottom: 8px;
    font-size: 13px;
}

.nmw-select {
    background: #2a2a2a;
    color: #fff;
    padding: 8px;
}

.nmw-analysis-wrap {
    display: none;
    margin-bottom: 8px;
    position: relative;
}

.nmw-keyword-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.nmw-keyword-row .nmw-input {
    flex: 1;
    margin-bottom: 0;
}

.nmw-keyword-pick-btn {
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #333;
    color: #ccc;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nmw-keyword-popup {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    margin-top: 4px;
    max-height: min(200px, 32vh);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 6px;
    z-index: 20;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.nmw-keyword-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

.nmw-capture-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #4ecdc4;
    color: #111;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.nmw-session-list {
    max-height: min(140px, 24vh);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #2a2a2a;
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    color: #bbb;
}

@media (max-width: 1024px), (pointer: coarse) {
    .nmw-overlay {
        align-items: stretch;
        justify-content: center;
        padding:
            calc(56px + env(safe-area-inset-top, 0px))
            max(12px, env(safe-area-inset-left, 0px))
            max(12px, env(safe-area-inset-bottom, 0px))
            max(12px, env(safe-area-inset-right, 0px));
    }

    .nmw-panel {
        width: min(480px, 100%);
        max-width: 100%;
        max-height: calc(100dvh - 68px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    .nmw-panel__header {
        min-height: 44px;
        margin-bottom: 12px;
    }

    .nmw-panel__close {
        min-width: 44px;
        min-height: 44px;
        font-size: 24px;
    }

    .nmw-input,
    .nmw-select {
        padding: 12px 14px;
        font-size: 16px;
        margin-bottom: 10px;
    }

    .nmw-capture-btn {
        padding: 14px;
        font-size: 15px;
        min-height: 48px;
    }

    .nmw-keyword-pick-btn {
        min-width: 48px;
        min-height: 48px;
        font-size: 14px;
        padding: 0 14px;
    }

    .nmw-session-list {
        max-height: min(160px, 28vh);
    }
}

@media (max-width: 768px) {
    .nmw-overlay {
        padding-top: calc(48px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    .nmw-panel {
        width: 100%;
        border-radius: 12px;
        max-height: calc(100dvh - 124px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .nmw-panel {
        max-height: calc(100dvh - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }

    .nmw-session-list {
        max-height: min(100px, 20vh);
    }

    .nmw-keyword-popup {
        max-height: min(140px, 28vh);
    }
}

/* ==================== 物理暂停按钮警示（不可手动关闭） ==================== */
.physical-pause-button-alert {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 25000;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.physical-pause-button-alert.show {
    display: flex;
}

body.physical-pause-button-alert-open {
    overflow: hidden;
}

.physical-pause-button-alert__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(120, 0, 0, 0.72);
    backdrop-filter: blur(2px);
    cursor: not-allowed;
}

.physical-pause-button-alert__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(86vw, 440px);
    max-height: min(78vh, 480px);
    background: linear-gradient(180deg, #2a1010 0%, #1a0a0a 100%);
    border: 2px solid #ff4d4f;
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.25), 0 18px 48px rgba(0, 0, 0, 0.55);
    animation: physical-pause-button-alert-pulse 1.4s ease-in-out infinite;
    color: #fff;
    padding: 16px 18px 14px;
}

.physical-pause-button-alert__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

@keyframes physical-pause-button-alert-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.22), 0 18px 48px rgba(0, 0, 0, 0.55); }
    50% { box-shadow: 0 0 0 10px rgba(255, 77, 79, 0.38), 0 18px 48px rgba(0, 0, 0, 0.55); }
}

.physical-pause-button-alert__icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #ff4d4f;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    line-height: 46px;
    text-align: center;
}

.physical-pause-button-alert__header {
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    color: #ffb4b4;
    margin-bottom: 10px;
}

.physical-pause-button-alert__hint {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #ffd6d6;
    text-align: center;
}

.physical-pause-button-alert__status {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 120, 120, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
}

.physical-pause-button-alert__row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    line-height: 1.4;
}

.physical-pause-button-alert__row:last-child {
    border-bottom: none;
}

.physical-pause-button-alert__label {
    color: #ffb4b4;
    flex: 0 0 auto;
    min-width: 88px;
}

.physical-pause-button-alert__value {
    color: #fff;
    text-align: right;
    flex: 1 1 auto;
}

.physical-pause-button-alert__footer {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 12px;
}

.physical-pause-button-alert__footer .toolbar-btn {
    min-width: 120px;
    min-height: 44px;
    padding: 10px 24px;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__backdrop {
    background: rgba(0, 60, 30, 0.72);
}

.physical-pause-button-alert__panel--reset,
.physical-pause-button-alert--reset .physical-pause-button-alert__panel {
    background: linear-gradient(180deg, #102a18 0%, #081a10 100%);
    border-color: #52c41a;
    animation: none;
    box-shadow: 0 0 0 4px rgba(82, 196, 26, 0.25), 0 18px 48px rgba(0, 0, 0, 0.55);
}

.physical-pause-button-alert--reset .physical-pause-button-alert__icon {
    background: #52c41a;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__header {
    color: #b7eb8f;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__hint {
    color: #d9f7be;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__status {
    border-color: rgba(120, 200, 120, 0.35);
}

.physical-pause-button-alert--reset .physical-pause-button-alert__label {
    color: #b7eb8f;
}

/* ==================== 物理暂停按钮警示（不可手动关闭） ==================== */
.physical-pause-button-alert {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 25000;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.physical-pause-button-alert.show {
    display: flex;
}

body.physical-pause-button-alert-open {
    overflow: hidden;
}

.physical-pause-button-alert__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(120, 0, 0, 0.72);
    backdrop-filter: blur(2px);
    cursor: not-allowed;
}

.physical-pause-button-alert__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(86vw, 440px);
    max-height: min(78vh, 480px);
    background: linear-gradient(180deg, #2a1010 0%, #1a0a0a 100%);
    border: 2px solid #ff4d4f;
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.25), 0 18px 48px rgba(0, 0, 0, 0.55);
    animation: physical-pause-button-alert-pulse 1.4s ease-in-out infinite;
    color: #fff;
    padding: 16px 18px 14px;
}

.physical-pause-button-alert__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

@keyframes physical-pause-button-alert-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.22), 0 18px 48px rgba(0, 0, 0, 0.55); }
    50% { box-shadow: 0 0 0 10px rgba(255, 77, 79, 0.38), 0 18px 48px rgba(0, 0, 0, 0.55); }
}

.physical-pause-button-alert__icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #ff4d4f;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    line-height: 46px;
    text-align: center;
}

.physical-pause-button-alert__header {
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    color: #ffb4b4;
    margin-bottom: 10px;
}

.physical-pause-button-alert__hint {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #ffd6d6;
    text-align: center;
}

.physical-pause-button-alert__status {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 120, 120, 0.35);
    border-radius: 8px;
    padding: 8px 10px;
}

.physical-pause-button-alert__row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    line-height: 1.4;
}

.physical-pause-button-alert__row:last-child {
    border-bottom: none;
}

.physical-pause-button-alert__label {
    color: #ffb4b4;
    flex: 0 0 auto;
    min-width: 88px;
}

.physical-pause-button-alert__value {
    color: #fff;
    text-align: right;
    flex: 1 1 auto;
}

.physical-pause-button-alert__footer {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 12px;
}

.physical-pause-button-alert__footer .toolbar-btn {
    min-width: 120px;
    min-height: 44px;
    padding: 10px 24px;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__backdrop {
    background: rgba(0, 60, 30, 0.72);
}

.physical-pause-button-alert__panel--reset,
.physical-pause-button-alert--reset .physical-pause-button-alert__panel {
    background: linear-gradient(180deg, #102a18 0%, #081a10 100%);
    border-color: #52c41a;
    animation: none;
    box-shadow: 0 0 0 4px rgba(82, 196, 26, 0.25), 0 18px 48px rgba(0, 0, 0, 0.55);
}

.physical-pause-button-alert--reset .physical-pause-button-alert__icon {
    background: #52c41a;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__header {
    color: #b7eb8f;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__hint {
    color: #d9f7be;
}

.physical-pause-button-alert--reset .physical-pause-button-alert__status {
    border-color: rgba(120, 200, 120, 0.35);
}

.physical-pause-button-alert--reset .physical-pause-button-alert__label {
    color: #b7eb8f;
}
