/* =========================================================
   两地距离计算器 - distance_calculator.css
   参考 svg_editor.css 风格，保持平台视觉一致性
   ========================================================= */

/* ── 全屏容器 ───────────────────────────────────────────── */
.dc-container {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    min-height: 560px;
    margin: 0 0 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.dc-container.is-fullscreen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    border-radius: 0;
    border: none;
    margin: 0;
    box-shadow: none;
}

.dc-container.is-fullscreen .dc-main {
    flex: 1;
    height: 0; /* 允许 flex 子元素充满 */
}

/* ── 工具栏 ──────────────────────────────────────────────── */
.dc-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    background: linear-gradient(to bottom, #2d3748, #1a202c);
    border-bottom: 1px solid #1a202c;
    flex-shrink: 0;
    flex-wrap: wrap;
    min-height: 46px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 6px;
}

.toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255,255,255,0.22);
}

.toolbar-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e2e8f0;
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

.toolbar-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.28);
    color: #fff;
}

.toolbar-btn:active {
    transform: translateY(1px);
    background: rgba(255,255,255,0.12);
}

.dc-calc-btn {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    border-color: #2b6cb0;
    color: #fff;
    font-weight: 600;
}

.dc-calc-btn:hover {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border-color: #3182ce;
    box-shadow: 0 2px 8px rgba(49,130,206,0.4);
}

/* 草稿已暂存提示 */
.draft-saved-hint {
    font-size: 11px;
    color: #68d391;
    font-weight: 600;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    animation: fadeIn 0.2s ease;
}

/* ── 主内容区 ────────────────────────────────────────────── */
.dc-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 514px;
}

/* ── 左侧输入面板 ─────────────────────────────────────────── */
.dc-input-panel {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 16px;
    background: #fafbfc;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.dc-input-panel::-webkit-scrollbar {
    width: 5px;
}
.dc-input-panel::-webkit-scrollbar-track {
    background: transparent;
}
.dc-input-panel::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}
.dc-input-panel::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 坐标卡片 */
.coord-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 14px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: border-color 0.2s;
}

.coord-card:hover {
    border-color: #bee3f8;
}

.start-card {
    border-top: 3px solid #38a169;
}

.end-card {
    border-top: 3px solid #e53e3e;
}

.coord-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.coord-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.start-badge {
    background: #38a169;
    color: #fff;
}

.end-badge {
    background: #e53e3e;
    color: #fff;
}

.coord-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

/* 坐标输入行 */
.coord-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.coord-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coord-field label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.coord-field label small {
    color: #a0aec0;
    font-weight: 400;
}

.coord-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3748;
    background: #fff;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: 'SFMono-Regular', Consolas, monospace;
    -moz-appearance: textfield;
}

.coord-input::-webkit-inner-spin-button,
.coord-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.coord-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
}

.coord-input.is-error {
    border-color: #fc8181;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.25);
}

.field-hint {
    font-size: 11px;
    color: #a0aec0;
    line-height: 1.3;
}

/* 地点名称行 */
.coord-name-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coord-name-row label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.coord-name-row label small {
    color: #a0aec0;
    font-weight: 400;
}

.name-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #2d3748;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.name-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.12);
}

/* 交换按钮行 */
.swap-btn-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}

.swap-center-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 16px;
    cursor: pointer;
    color: #718096;
    font-size: 18px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.swap-center-btn:hover {
    background: #ebf8ff;
    border-color: #90cdf4;
    color: #3182ce;
    transform: scale(1.05);
}

.swap-label {
    font-size: 10px;
    font-weight: 600;
    color: #a0aec0;
    letter-spacing: 0.05em;
}

.swap-center-btn:hover .swap-label {
    color: #3182ce;
}

/* 计算按钮行 */
.calc-btn-row {
    margin-top: 4px;
}

.calc-main-btn {
    width: 100%;
    padding: 12px 0;
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

.calc-main-btn:hover {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    box-shadow: 0 4px 14px rgba(49,130,206,0.38);
    transform: translateY(-1px);
}

.calc-main-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-icon {
    font-size: 16px;
}

/* 使用提示 */
.input-tips {
    font-size: 11.5px;
    color: #a0aec0;
    text-align: center;
    padding: 8px 0 2px;
    line-height: 1.6;
}

.input-tips kbd {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: monospace;
    color: #4a5568;
}

/* ── 右侧结果面板 ─────────────────────────────────────────── */
.dc-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #fff;
    padding: 20px 22px;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.dc-result-panel::-webkit-scrollbar {
    width: 5px;
}
.dc-result-panel::-webkit-scrollbar-track {
    background: transparent;
}
.dc-result-panel::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}
.dc-result-panel::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 空状态 */
.no-result-tip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 10px;
    color: #a0aec0;
    padding: 32px 20px;
    text-align: center;
    min-height: 300px;
}

/* 空状态快速示例区域 */
.quick-examples {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.quick-ex-label {
    font-size: 12px;
    color: #cbd5e0;
    flex-shrink: 0;
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
}

.quick-ex-btn {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    line-height: 1.5;
}

.quick-ex-btn:hover {
    background: #bee3f8;
    color: #1a4971;
    border-color: #90cdf4;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(49,130,206,0.2);
}

.no-result-icon {
    font-size: 56px;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.no-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #718096;
}

.no-result-sub {
    font-size: 13px;
    color: #a0aec0;
    max-width: 320px;
    line-height: 1.6;
}

/* 结果内容 */
.result-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 路线标题栏 */
.result-route-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
    font-size: 13px;
    color: #718096;
    overflow: hidden;
}

.route-point {
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

.start-point {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.end-point {
    background: #fff5f5;
    color: #9b2c2c;
    border: 1px solid #feb2b2;
}

.route-line {
    color: #cbd5e0;
    letter-spacing: -2px;
    font-size: 11px;
    flex-shrink: 0;
}

.route-arrow-icon {
    font-size: 18px;
    flex-shrink: 0;
    animation: fly 1.5s ease-in-out infinite alternate;
}

@keyframes fly {
    from { transform: translateX(-3px); }
    to   { transform: translateX(3px); }
}

/* 主距离卡片（左側蓝色加粗边框） */
.result-main-card {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border: 1px solid #bee3f8;
    border-left: 4px solid #3182ce;
    border-radius: 12px;
    padding: 20px 24px;
    text-align: center;
}

.distance-primary {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.distance-value {
    font-size: 52px;
    font-weight: 800;
    color: #2b6cb0;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -1px;
    transition: font-size 0.2s ease;
}

/* 自适应字号：距离较大时缩小字号避免溢出 */
.distance-value.is-large  { font-size: 42px; letter-spacing: -1.5px; }
.distance-value.is-xlarge { font-size: 34px; letter-spacing: -2px; }

.distance-unit {
    font-size: 18px;
    font-weight: 600;
    color: #4a90d9;
    padding-bottom: 4px;
}

.distance-secondary {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #718096;
    font-size: 13px;
}

.dist-alt {
    color: #4a5568;
    font-weight: 500;
}

.dist-sep {
    color: #cbd5e0;
}

/* 详情卡片网格 */
.result-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.detail-card {
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    padding: 12px 14px;
    transition: background 0.2s, box-shadow 0.2s;
}

/* 各卡片左側彩色语义边框 */
.detail-card:nth-child(1) { border-left: 4px solid #3182ce; } /* 方位角 - 蓝 */
.detail-card:nth-child(2) { border-left: 4px solid #805ad5; } /* 反向方位角 - 紫 */
.detail-card:nth-child(3) { border-left: 4px solid #38a169; } /* 中间点 - 绿 */
.detail-card:nth-child(4) { border-left: 4px solid #dd6b20; } /* 圆心角 - 橙 */

/* hover 仅改背景和阴影，不用 border-color 简写覆盖左边框语义色 */
.detail-card:hover {
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(49,130,206,0.1);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.detail-icon {
    font-size: 14px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #718096;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.detail-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    word-break: break-all;
}

.detail-sub {
    font-size: 11.5px;
    color: #a0aec0;
    margin-top: 2px;
    line-height: 1.4;
}

/* 距离参照卡片（左側琅珀色语义边框） */
.reference-card {
    background: #fffff0;
    border: 1px solid #fefcbf;
    border-left: 4px solid #d69e2e;
    border-radius: 8px;
    padding: 12px 14px;
}

.reference-title {
    font-size: 12px;
    font-weight: 600;
    color: #744210;
    margin-bottom: 10px;
}

.reference-bars {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ref-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.ref-label {
    width: 90px;
    flex-shrink: 0;
    color: #744210;
    font-weight: 500;
}

.ref-bar-wrap {
    flex: 1;
    height: 10px;
    background: #fef9c3;
    border-radius: 5px;
    overflow: hidden;
}

.ref-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(to right, #f6ad55, #ed8936);
    transition: width 0.6s ease;
    max-width: 100%;
}

.ref-val {
    width: 80px;
    flex-shrink: 0;
    text-align: right;
    color: #975a16;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* 地图链接 */
.map-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.map-link-btn {
    flex: 1;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.google-link {
    background: #ebf8ff;
    color: #2b6cb0;
    border-color: #bee3f8;
}

.google-link:hover {
    background: #bee3f8;
    color: #1a4971;
    text-decoration: none;
}

.baidu-link {
    background: #fff5f5;
    color: #c53030;
    border-color: #fed7d7;
}

.baidu-link:hover {
    background: #fed7d7;
    color: #9b2c2c;
    text-decoration: none;
}

/* 错误提示 */
.result-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #e53e3e;
    border-radius: 8px;
    color: #c53030;
    font-size: 14px;
    margin-top: 0;
    animation: shake 0.3s ease;
    line-height: 1.6;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}

.error-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ── 行程时间估算 ─────────────────────────────────────────────── */
/* 行程时间估算卡片 */
.travel-card {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-left: 4px solid #38a169;
    border-radius: 8px;
    padding: 12px 14px;
}

.travel-title {
    font-size: 12px;
    font-weight: 600;
    color: #276749;
    margin-bottom: 10px;
}

.travel-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.travel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 5px 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    transition: background 0.15s;
}

.travel-item:hover {
    background: rgba(255,255,255,0.95);
}

.travel-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.travel-name {
    font-weight: 600;
    color: #276749;
    width: 32px;
    flex-shrink: 0;
}

.travel-speed {
    color: #a0aec0;
    font-size: 11px;
    flex-shrink: 0;
}

.travel-time {
    margin-left: auto;
    font-weight: 700;
    color: #2d3748;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}

.examples-drawer {
    position: fixed;
    top: 0;
    right: -380px;
    width: 360px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.14);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid #e2e8f0;
}

/* ── 示例抽屉内容区 ──────────────────────────────────────── */

.examples-drawer.is-open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.drawer-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
}

.drawer-close-btn {
    background: #fff0f0;
    border: none;
    color: #e53e3e;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 9px;
    border-radius: 4px;
    transition: all 0.18s;
    line-height: 1;
}

.drawer-close-btn:hover {
    background: #fed7d7;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
}

.example-tip {
    font-size: 12px;
    color: #a0aec0;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e2e8f0;
}

/* 示例卡片 */
.example-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 13px;
    margin-bottom: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-item:hover {
    background: #ebf8ff;
    border-color: #90cdf4;
    transform: translateX(-2px);
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.example-coords {
    font-size: 11px;
    color: #a0aec0;
    font-family: 'SFMono-Regular', Consolas, monospace;
    line-height: 1.7;
}

.example-distance {
    display: inline-block;
    margin-top: 6px;
    background: #e6fffa;
    border: 1px solid #9ae6b4;
    color: #276749;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 抽屉遮罩 */
.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.32);
    z-index: 1000;
    backdrop-filter: blur(1px);
}

.drawer-overlay.is-visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── 响应式适配 ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .dc-main {
        flex-direction: column;
    }

    .dc-input-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .result-detail-grid {
        grid-template-columns: 1fr;
    }

    .distance-value {
        font-size: 38px;
    }

    .examples-drawer {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .coord-row {
        flex-direction: column;
    }

    .map-links {
        flex-direction: column;
    }
}

/* ── 历史记录抽屉 ────────────────────────────────────── */
.dc-history-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    height: 100vh;
    background: #fff;
    box-shadow: 4px 0 24px rgba(0,0,0,0.14);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid #e2e8f0;
}

.dc-history-drawer.is-open {
    left: 0;
}

/* 历史列表容器 */
.dc-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 历史条目卡片 */
.dc-hi-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3182ce;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.dc-hi-item:hover {
    box-shadow: 0 2px 8px rgba(49,130,206,0.1);
    transform: translateX(1px);
}

/* 路线行 */
.dc-hi-route {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.dc-hi-from, .dc-hi-to {
    font-size: 12.5px;
    font-weight: 600;
    color: #2d3748;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc-hi-arrow {
    color: #a0aec0;
    font-size: 12px;
    flex-shrink: 0;
}

/* meta 行：距离 + 时间 */
.dc-hi-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dc-hi-dist {
    font-size: 13px;
    font-weight: 700;
    color: #2b6cb0;
    font-variant-numeric: tabular-nums;
}

.dc-hi-date {
    font-size: 11px;
    color: #a0aec0;
}

/* 操作行 */
.dc-hi-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.dc-hi-restore {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    line-height: 1.5;
}

.dc-hi-restore:hover {
    background: #bee3f8;
    color: #1a4971;
}

.dc-hi-del {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #e53e3e;
    font-size: 13px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    font-family: inherit;
    flex-shrink: 0;
}

.dc-hi-del:hover {
    background: #fed7d7;
    color: #9b2c2c;
}

/* 空状态 */
.dc-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #a0aec0;
    font-size: 14px;
    gap: 8px;
    text-align: center;
}

.dc-history-empty > div:first-child {
    font-size: 36px;
    opacity: 0.5;
}

/* 历史按钮徽章（带圈数字） */
.dc-history-badge {
    display: inline-block;
    color: #e53e3e;
    font-size: 13px;
    font-weight: 700;
    margin-left: 2px;
    line-height: 1;
}

/* 清空历史按钮 */
.dc-clear-history-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(229,62,62,0.3);
    color: #fc8181;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
}

.dc-clear-history-btn:hover {
    background: rgba(252,129,129,0.1);
    border-color: rgba(229,62,62,0.5);
    color: #f56565;
}
