/* 自驾游打卡地图 - 样式 */

.tm-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    color: #2c3e50;
    box-sizing: border-box;
}
.tm-app * { box-sizing: border-box; }

/* 工具栏 */
.tm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.tm-page-title {
    font-size: 20px;
    margin: 0;
    color: #2c3e50;
    flex: 1;
    min-width: 0;
}
.tm-hint {
    font-size: 13px;
    color: #95a5a6;
    flex: 1;
    min-width: 0;
}

/* 按钮 */
.tm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    white-space: nowrap;
}
/* v3.9.23：实底按钮渲染成 <a> 时，压过主题/浏览器的链接灰/蓝色，文字一律白色 */
a.tm-btn,
a.tm-btn:visited,
a.tm-btn:hover,
a.tm-btn:focus,
a.tm-btn:active {
    color: #fff;
    text-decoration: none;
}
/* 文字链接型按钮保持蓝色下划线 */
a.tm-btn.tm-btn-link,
a.tm-btn.tm-btn-link:visited,
a.tm-btn.tm-btn-link:hover,
a.tm-btn.tm-btn-link:focus {
    color: #2980b9;
    text-decoration: none;
}
a.tm-btn.tm-btn-link:hover { text-decoration: underline; }
.tm-btn-primary { background: #27ae60; }
.tm-btn-primary:hover { background: #229954; }
.tm-btn-secondary { background: #3498db; }
.tm-btn-secondary:hover { background: #2980b9; }
.tm-btn-success { background: #e67e22; }
.tm-btn-success:hover { background: #d35400; }
.tm-btn-active { box-shadow: 0 0 0 3px rgba(39,174,96,0.35); background: #229954 !important; }
/* 微信分享按钮（2026-09-02） */
.tm-btn-wx { background: #07c160; }
.tm-btn-wx:hover { background: #06ad56; }
/* 工具栏按钮组（2026-09-02：编辑器三个按钮并排，去掉大标题与长指引后的清爽排版） */
.tm-toolbar-btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* 地图 */
.tm-map.tm-placing,
.tm-map.tm-placing.leaflet-grab,
.tm-map.tm-placing.leaflet-drag-target {
    cursor: crosshair !important;
}

/* 打点模式浮动提示（2026-09-02：仅打点时出现在地图下方，平时完全隐藏） */
.tm-placing-tip {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 9600;
    max-width: 92vw;
    background: rgba(30,60,114,0.95);
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    padding: 9px 16px;
    border-radius: 22px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .tm-placing-tip { white-space: normal; }
}

.tm-map {
    height: 520px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    z-index: 1;
}

/* 登录提示 */
.tm-login-tip {
    text-align: center;
    padding: 48px 20px;
    background: #f7f9fb;
    border-radius: 12px;
    border: 1px dashed #bdc3c7;
}
.tm-login-tip p { font-size: 16px; color: #7f8c8d; margin-bottom: 16px; }

/* 弹窗 */
.tm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}
.tm-modal-box {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.tm-modal-box h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #2c3e50;
}
.tm-modal-box label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
    font-weight: 500;
}
.tm-modal-box input[type="text"],
.tm-modal-box input[type="date"],
.tm-modal-box textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.tm-modal-box input[type="file"] {
    display: block;
    margin-top: 6px;
    font-size: 13px;
}
.tm-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
}
.tm-checkbox input { margin: 0; }
.tm-req { color: #e74c3c; }
.tm-photo-preview {
    margin-top: 8px;
    max-width: 100%;
    max-height: 160px;
    border-radius: 8px;
    object-fit: cover;
}
.tm-route-points {
    font-size: 13px;
    color: #95a5a6;
    margin: 8px 0;
}
.tm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

/* 自定义地图标记 */
.tm-div-icon { background: transparent; border: none; }
.tm-pin {
    width: 20px;
    height: 20px;
    background: #e74c3c;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.tm-pin-active { background: #27ae60; }

/* v3.16.4：未打卡占位点——橙色脉冲动画，提醒作者补充打卡内容（仅作者本人可见） */
.tm-pin-unchecked { background: #f39c12; }
.tm-pin-unchecked::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 20px; height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    border: 2px solid #f39c12;
    animation: tmUncheckedPulse 1.8s ease-out infinite;
    pointer-events: none;
}
@keyframes tmUncheckedPulse {
    0%   { transform: scale(1);   opacity: 0.9; }
    70%  { transform: scale(2.6); opacity: 0; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* 弹出层 */
.tm-popup { min-width: 180px; max-width: 240px; }
.tm-popup strong { font-size: 15px; color: #2c3e50; }
.tm-popup-date { font-size: 12px; color: #95a5a6; margin-top: 4px; }
.tm-popup p { font-size: 13px; color: #555; margin: 6px 0 0; line-height: 1.5; }
.tm-popup-photo {
    margin-top: 8px;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
}

/* Leaflet 弹出层微调 */
.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { margin: 12px 14px; }

/* pin 外层：为站点编号 .tm-pin-num 提供定位容器 */
.tm-pin-wrap { position: relative; }

/* 响应式 */
@media (max-width: 600px) {
    .tm-map { height: 380px; }
    .tm-page-title { font-size: 18px; }
    .tm-btn { padding: 7px 12px; font-size: 13px; }
}

/* v3.9.10 手机端：地图左右出血铺满视口（与首页一致，无视主题容器内边距）；
   仅非全屏页（全屏页本就 100% 宽）；PC 不进此媒体查询，零影响 */
@media (max-width: 600px) {
    body:not(.tm-fullscreen-body) #tm-app .tm-map {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* v3.9.13 手机端固定舞台（参考首页 travel-map-nav v0.16.6 模式）：
   主题页头/工具栏按钮/连线黄条/地图(43dvh)固定，页面标题+正文移到地图下方滚动区。
   仅 body 带 tm-fp-stage-active（JS 手机端重组后）才生效；PC 不进媒体查询零影响。 */
@media (max-width: 600px) {
    body.tm-fp-stage-active {
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }
    body.tm-fp-stage-active #page,
    body.tm-fp-stage-active #main,
    body.tm-fp-stage-active .wrapper,
    body.tm-fp-stage-active #primary,
    body.tm-fp-stage-active #content,
    body.tm-fp-stage-active #content > article,
    body.tm-fp-stage-active .entry-content {
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    body.tm-fp-stage-active .entry-content {
        height: auto;
    }
    body.tm-fp-stage-active .entry-footer,
    body.tm-fp-stage-active #colophon,
    body.tm-fp-stage-active footer[role="contentinfo"] {
        display: none;
    }
    body.tm-fp-stage-active #tm-app.tm-app {
        flex: 1 1 auto;
        min-height: 0;
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    body.tm-fp-stage-active #tm-app .tm-toolbar {
        flex: 0 0 auto;
        margin: 0;
        padding: 10px 14px;
    }
    body.tm-fp-stage-active #tm-app #tm-top-wrap { flex: 0 0 auto; }
    body.tm-fp-stage-active #tm-app #tm-map.tm-map {
        flex: 0 0 43dvh;
        height: 43dvh;
        min-height: 0;
    }
    /* 地图下方滚动区：页面标题 + 正文文字 */
    #tm-app .tm-fp-info {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 12px 16px 16px;
        background: #fff;
        border-top: 1px solid #eef1f5;
    }
    #tm-app .tm-fp-info .entry-header { margin: 0 0 8px; }
    #tm-app .tm-fp-info .entry-title {
        font-size: 19px;
        line-height: 1.35;
        margin: 0;
        color: #111827;
    }
    #tm-app .tm-fp-info h2, #tm-app .tm-fp-info h3 {
        font-size: 15px;
        margin: 6px 0;
        color: #111827;
    }
    #tm-app .tm-fp-info p {
        font-size: 14px;
        line-height: 1.7;
        margin: 0 0 10px;
        color: #374151;
    }
    #tm-app .tm-fp-info ul, #tm-app .tm-fp-info ol {
        margin: 0;
        padding-left: 20px;
        font-size: 13.5px;
        line-height: 1.72;
        color: #374151;
    }
    #tm-app .tm-fp-info li { margin-bottom: 6px; }
    #tm-app .tm-fp-info img { max-width: 100%; border-radius: 10px; }
}

/* ============ 2026-08-31 加：分享足迹 ============ */

/* 分享弹窗 */
.tm-share-box { max-width: 480px; }
.tm-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.tm-share-actions .tm-btn { flex: 1; min-width: 100px; }
.tm-share-tip {
    text-align: center;
    font-size: 12px;
    color: #95a5a6;
    margin-top: 10px;
}

/* 海报模板（html2canvas 截图区域） */
.tm-poster {
    width: 420px;
    max-width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #27ae60 100%);
    border-radius: 14px;
    padding: 22px 22px 18px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.25);
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}
.tm-poster-show { transform: translateY(0); opacity: 1; }

/* 海报头部 */
.tm-poster-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tm-poster-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #1e3c72;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.tm-poster-user { flex: 1; min-width: 0; }
.tm-poster-name { font-size: 17px; font-weight: 600; line-height: 1.2; }
.tm-poster-sub { font-size: 12px; opacity: 0.85; margin-top: 4px; }

/* 海报统计 */
.tm-poster-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.tm-poster-stat {
    flex: 1;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    backdrop-filter: blur(6px);
}
.tm-poster-stat-num { font-size: 22px; font-weight: 700; line-height: 1.2; }
.tm-poster-stat-label { font-size: 11px; opacity: 0.9; margin-top: 2px; }

/* 海报主标语 */
.tm-poster-slogan {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin: 12px 0 14px;
    padding: 8px 0;
    border-top: 1px dashed rgba(255,255,255,0.4);
    border-bottom: 1px dashed rgba(255,255,255,0.4);
    letter-spacing: 2px;
}

/* 海报点位列表 */
.tm-poster-list {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    min-height: 60px;
}
.tm-poster-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    line-height: 1.4;
}
.tm-poster-pin { flex-shrink: 0; }
.tm-poster-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tm-poster-item-date { font-size: 11px; opacity: 0.75; flex-shrink: 0; }
.tm-poster-more {
    text-align: center;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255,255,255,0.3);
}
.tm-poster-empty {
    text-align: center;
    font-size: 13px;
    opacity: 0.85;
    padding: 12px 0;
}

/* 海报：旅程→点位 两级分组（2026-09-02） */
.tm-poster-trip {
    background: rgba(255,255,255,0.10);
    border-radius: 8px;
    padding: 6px 10px 7px;
    margin-bottom: 8px;
}
.tm-poster-trip-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 2px;
}
.tm-poster-trip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
.tm-poster-trip-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tm-poster-trip-n {
    font-size: 10px;
    opacity: 0.85;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: 1px 8px;
    flex-shrink: 0;
}
.tm-poster-trip-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    padding: 3px 0;
    line-height: 1.4;
}
.tm-poster-trip-no {
    width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.tm-poster-trip .tm-poster-more {
    margin-top: 2px;
    padding-top: 2px;
    border-top: none;
    font-size: 11px;
}

/* 海报底部 */
.tm-poster-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.95;
    margin-top: 4px;
}
.tm-poster-brand { font-weight: 600; flex: 1; }

/* 2026-08-31 加：二维码区 */
.tm-poster-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.tm-poster-qr {
    width: 88px;
    height: 88px;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.tm-poster-qr canvas,
.tm-poster-qr img { width: 80px !important; height: 80px !important; display: block; }
.tm-poster-qr table { margin: 0 auto !important; }
.tm-qr-fallback {
    font-size: 10px;
    color: #1e3c72;
    text-align: center;
    line-height: 1.3;
    padding: 4px;
    word-break: break-all;
    overflow: hidden;
}
.tm-poster-tip {
    opacity: 0.9;
    font-size: 10px;
    text-align: center;
    max-width: 88px;
}

/* 2026-08-31 加：他人模式横幅 */
.tm-other-banner {
    background: linear-gradient(90deg, #f39c12, #e67e22);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(230,126,34,0.25);
}
.tm-other-banner strong { font-weight: 700; }

/* 移动端适配 */
@media (max-width: 480px) {
    .tm-poster { padding: 18px 16px 14px; }
    .tm-poster-slogan { font-size: 16px; }
    .tm-poster-stat-num { font-size: 20px; }
    .tm-share-actions .tm-btn { min-width: 0; font-size: 13px; padding: 7px 10px; }
    .tm-poster-qr { width: 72px; height: 72px; }
    .tm-poster-qr canvas,
    .tm-poster-qr img { width: 64px !important; height: 64px !important; }
    .tm-poster-tip { max-width: 72px; font-size: 9px; }
}
/* ============== 2026-08-31 18:43 加：连线模式 UI ============== */
.tm-btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.tm-btn-warning:hover { opacity: 0.9; transform: translateY(-1px); }
.tm-btn-warning.tm-btn-active {
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.25);
}

.tm-btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.tm-btn-danger:hover { opacity: 0.9; transform: translateY(-1px); }

/* 选中点高亮（连线模式） */
.tm-pin-route-selected {
    background: #3498db !important;
    border-color: #2980b9 !important;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.4);
    transform: scale(1.15);
}
.tm-pin-route-selected::after {
    content: attr(data-sel-idx);
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: #fff;
    color: #2980b9;
    border: 2px solid #2980b9;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

/* 路线弹窗列表 */
.tm-route-hint {
    color: #7f8c8d;
    font-size: 13px;
    margin: 0 0 10px;
}
.tm-route-selected {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    background: #f8f9fa;
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
}
.tm-route-selected li {
    padding: 8px 12px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tm-route-selected li:last-child { border-bottom: none; }
.tm-route-selected li.tm-route-empty {
    color: #95a5a6;
    font-style: italic;
    justify-content: center;
}
.tm-route-date {
    color: #7f8c8d;
    font-size: 12px;
    flex: 1;
}
.tm-route-remove {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
}
.tm-route-remove:hover { color: #c0392b; }

@media (max-width: 480px) {
    .tm-toolbar .tm-btn { font-size: 13px; padding: 7px 10px; }
}

/* ============== 2026-09-02 v2.0「我的足迹」：旅程连线 / 游客试用 ============== */

/* 按钮尺寸与禁用态 */
.tm-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.tm-btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.tm-btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.tm-btn-link {
    background: none;
    color: #2980b9;
    padding: 2px 4px;
    font-size: 13px;
}
.tm-btn-link:hover { text-decoration: underline; }

/* 顶部提示区（游客试用条 / 导入条 / 旅程分享卡片） */
#tm-top-wrap { margin-bottom: 12px; }
.tm-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
}
#tm-top-wrap .tm-topbar {
    background: #eaf6ff;
    border: 1px solid #bcdcff;
    color: #1a5276;
}
.tm-topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-topbar-actions .tm-btn { text-decoration: none; }
.tm-topbar-sub {
    display: inline-block;
    font-size: 12px;
    opacity: .85;
    margin-left: 6px;
}

/* v3.9.21 游客账号体系：游客模式横幅（独立节点，不占用 top-wrap 槽位） */
.tm-guest-strip {
    background: #fff4f8;
    border: 1px solid #f8cfe0;
    color: #8a2d52;
    margin-bottom: 12px;
}
.tm-guest-strip .tm-btn { text-decoration: none; }
.tm-guest-strip .tm-btn-success { background: #e91e63; }
.tm-guest-strip-sub {
    display: block;
    font-size: 12px;
    opacity: .8;
}
.tm-guest-strip-ok {
    background: #effaf1;
    border: 1px solid #bfe8c8;
    color: #1e7e34;
}

/* v3.9.21 一键注册 / 绑定邮箱弹窗 */
.tm-guest-box { max-width: 380px; }
.tm-guest-sub {
    font-size: 13px;
    color: #888;
    line-height: 1.7;
    margin-bottom: 14px;
}
.tm-guest-captcha { margin-bottom: 6px; }
.tm-guest-captcha:empty { display: none; }
.tm-guest-msg {
    min-height: 18px;
    font-size: 13px;
    color: #d32f2f;
    margin: 8px 0 4px;
    word-break: break-all;
}
.tm-guest-label { display: block; margin: 10px 0 4px; }
.tm-guest-label input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    margin-top: 6px;
    outline: none;
    box-sizing: border-box;
}
.tm-guest-label input:focus { border-color: #e91e63; }
.tm-guest-box .tm-btn { width: 100%; margin-top: 10px; box-sizing: border-box; }

/* v3.9.21 足迹页登录引导里的一键开始说明 */
.tm-login-tip-sub {
    display: block;
    font-size: 13px;
    color: #95a5a6;
    margin: -4px 0 14px;
}
#tm-top-wrap .tm-btn-primary { background: #27ae60; }
#tm-top-wrap .tm-btn-secondary { background: #3498db; }
#tm-top-wrap .tm-btn-success { background: #e67e22; }

/* 连线模式横条 */
.tm-link-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #fff8e1;
    border: 1px dashed #e6c76b;
    font-size: 14px;
    color: #7a5a00;
}
.tm-link-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.15);
    flex-shrink: 0;
}
.tm-link-txt { font-weight: 600; flex: 1; min-width: 120px; }
.tm-link-count { font-size: 13px; color: #a8832a; }
.tm-link-actions { display: flex; gap: 8px; }

/* 地图标记：站号徽标 */
.tm-pin-wrap {
    position: relative;
    width: 26px;
    height: 30px;
    background: transparent;
    border: none;
}
.tm-pin-wrap .tm-pin {
    position: absolute;
    top: 2px;
    left: 3px;
}
.tm-pin-private { background: #95a5a6 !important; }
.tm-pin-num {
    position: absolute;
    top: -5px;
    left: 17px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    background: #e64980;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    padding: 0 2px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
    z-index: 2;
}

/* 旅程侧栏 */
.tm-journey-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 94vw;
    height: 100%;
    background: #fff;
    z-index: 9500;
    box-shadow: -8px 0 28px rgba(0,0,0,.16);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 只有内部列表可滚，面板本身不随内容撑开 */
    animation: tmPanelIn .22s ease;
}
/* 侧栏打开时锁住背景页，防止滚动穿透 */
body.tm-panel-lock { overflow: hidden; }
/* 登录用户：WP admin bar 会挡住顶部，整体下移并缩短高度 */
body.admin-bar .tm-journey-panel {
    top: 32px;
    height: calc(100% - 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .tm-journey-panel {
        top: 46px;
        height: calc(100% - 46px);
    }
}
@keyframes tmPanelIn {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.tm-jp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #ecf0f1;
    background: #fbfcfe;
    flex-shrink: 0;
}
.tm-jp-head strong { font-size: 16px; color: #2c3e50; }
.tm-jp-sub { font-size: 12px; color: #95a5a6; margin-top: 3px; }
.tm-jp-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tm-j-close {
    width: 32px;
    height: 32px;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    background: #eef2f5;
    color: #57606a;
    font-size: 16px;
}
.tm-j-close:hover { background: #e0e6eb; color: #24292f; }
.tm-j-list {
    flex: 1;
    min-height: 0; /* flex 子项可收缩，保证 overflow-y:auto 在固定高面板内生效 */
    overflow-y: auto;
    overscroll-behavior: contain; /* 滚到边界不带动背景页 */
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tm-j-empty {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.7;
    padding: 26px 8px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed #d0d7de;
}
.tm-j-sub { font-size: 12px; color: #95a5a6; }

/* 旅程卡片 */
.tm-jc {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: box-shadow .15s;
}
.tm-jc:hover { box-shadow: 0 3px 10px rgba(0,0,0,.09); }
.tm-jc-row { display: flex; align-items: flex-start; gap: 9px; cursor: zoom-in; }
.tm-jc-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.15);
    margin-top: 3px;
    flex-shrink: 0;
}
.tm-jc-main { flex: 1; min-width: 0; }
.tm-jc-name {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tm-jc-meta { font-size: 12px; color: #95a5a6; margin-top: 2px; }
.tm-jc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px dashed #ecf0f1;
}

/* 连线队列 */
.tm-jq-tip { font-size: 13px; color: #7a5a00; line-height: 1.6; background: #fff8e1; border-radius: 8px; padding: 8px 10px; }
.tm-jq-list { display: flex; flex-direction: column; gap: 6px; }
.tm-jq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 13px;
}
.tm-jq-num {
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.tm-jq-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-jq-ops { display: flex; gap: 2px; flex-shrink: 0; }
.tm-jq-btn {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 5px;
    width: 22px;
    height: 22px;
    line-height: 1;
    font-size: 12px;
    cursor: pointer;
    color: #57606a;
    padding: 0;
}
.tm-jq-btn:hover { border-color: #2980b9; color: #2980b9; }
.tm-jq-del { color: #e74c3c; }
.tm-jq-del:hover { border-color: #e74c3c; color: #e74c3c; }
/* v3.9.15：整行禁文字选中与长按系统菜单（复制/全选/搜一搜），长按=准备拖动 */
.tm-jq-item {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
/* 手指按住（进入拖动准备）时整行高亮 */
.tm-jq-chosen {
    background: #fdeef4;
    box-shadow: inset 0 0 0 1.5px #f1a0c0;
}
.tm-jq-chosen .tm-jq-drag { color: #e64980; }
/* v3.9.16 自研拖动：列表项让位走 transform 过渡；被拖项提起浮起（无过渡，跟手） */
.tm-jq-list .tm-jq-item { transition: transform 0.18s ease; }
.tm-jq-list .tm-jq-item.tm-jq-lift {
    transition: none;
    position: relative;
    z-index: 5;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    opacity: 0.97;
}
/* 拖动中：容器内禁文字选择/长按菜单（兜底，主要靠 JS contextmenu 拦截） */
.tm-jq-dragging {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
/* v3.9.14：拖动排序手柄（加大触摸区）+ 队列底部保存按钮 */
.tm-jq-drag {
    flex-shrink: 0;
    cursor: grab;
    color: #b0b8c1;
    font-size: 16px;
    line-height: 1;
    padding: 12px 12px 12px 6px;   /* 触摸区约 40px 宽，好按准 */
    margin: -10px 0 -10px -6px;    /* 负边距抵消，视觉占位不变 */
    touch-action: none;            /* 手柄上禁掉浏览器滚动手势 */
    user-select: none;
    -webkit-user-select: none;
}
.tm-jq-drag:active { cursor: grabbing; color: #98a1ab; }
.tm-jq-save {
    width: 100%;
    margin-top: 10px;
}

/* 旅程编辑弹窗 */
.tm-j-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* v3.10.0：旅程封面 */
.tm-j-cover { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.tm-j-cover-preview {
    width: 120px; height: 80px; border-radius: 8px; background: #f1f3f5;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    border: 1px dashed #ced4da; flex-shrink: 0;
}
.tm-j-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.tm-j-cover-empty { font-size: 12px; color: #868e96; text-align: center; padding: 0 8px; line-height: 1.4; }
.tm-j-cover-actions { display: flex; flex-direction: column; gap: 6px; }
.tm-j-dates { display: flex; gap: 12px; }
.tm-j-dates label { flex: 1; }
.tm-j-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #d0d7de;
    cursor: pointer;
    padding: 0;
    transition: transform .12s;
}
.tm-j-swatch:hover { transform: scale(1.15); }
.tm-j-swatch-on { box-shadow: 0 0 0 2px #2c3e50; transform: scale(1.1); }
.tm-j-tip {
    font-size: 12px;
    color: #95a5a6;
    line-height: 1.6;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
}

/* 旅程分享视图卡片 */
.tm-jview-card {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 3px 12px rgba(30,60,114,.2);
}
.tm-jview-title { font-size: 18px; font-weight: 700; }
.tm-jview-meta { font-size: 12px; opacity: .85; margin-top: 5px; }
.tm-jview-desc { font-size: 13px; line-height: 1.6; opacity: .95; margin-top: 7px; }
.tm-jview-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; }
/* v3.10.0：旅程详情封面、统计行、按天时间轴 */
.tm-jview-cover { margin: -14px -18px 12px; border-radius: 12px 12px 0 0; overflow: hidden; }
.tm-jview-cover img { width: 100%; display: block; max-height: 240px; object-fit: cover; }
.tm-jview-stats { display: flex; gap: 18px; margin-top: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); }
.tm-jview-stat { display: flex; flex-direction: column; align-items: center; }
.tm-jview-stat b { font-size: 18px; font-weight: 700; }
.tm-jview-stat span { font-size: 11px; opacity: .8; }
.tm-jview-timeline { margin-top: 12px; }
.tm-jview-day { margin-bottom: 12px; background: rgba(255,255,255,.08); border-radius: 8px; padding: 8px 10px; }
.tm-jview-day-h { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.tm-jview-day-n { opacity: .7; font-weight: 400; font-size: 11px; }
.tm-jview-stop { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
.tm-jview-stop:first-of-type { border-top: none; }
.tm-jview-stop-idx { width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #1e3c72; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tm-jview-stop-body { flex: 1; min-width: 0; }
.tm-jview-stop-name { font-size: 13px; font-weight: 600; }
.tm-jview-stop-desc { font-size: 12px; opacity: .85; margin-top: 2px; line-height: 1.5; }
.tm-jview-stop-photo { width: 100%; max-height: 180px; object-fit: cover; border-radius: 6px; margin-top: 6px; }

/* ================= v3.12.0 个人主页 ================= */
.tm-profile-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.tm-profile { background: #fff; border-radius: 18px; box-shadow: 0 4px 24px rgba(0,0,0,.06); overflow: hidden; }
/* 头部 */
.tm-profile-head { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 28px 24px 24px; color: #fff; }
.tm-profile-hero { display: flex; align-items: center; gap: 18px; position: relative; }
.tm-profile-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 4px solid rgba(255,255,255,.85); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.tm-profile-id { flex: 1; min-width: 0; }
.tm-profile-name { font-size: 24px; font-weight: 800; margin: 0; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.tm-profile-no { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.tm-no-badge { display: inline-block; background: rgba(255,255,255,.22); color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; backdrop-filter: blur(4px); }
.tm-public-badge { display: inline-block; background: rgba(72,219,150,.9); color: #064e3b; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.tm-private-badge { display: inline-block; background: rgba(255,255,255,.22); color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.tm-profile-bio { font-size: 13.5px; color: rgba(255,255,255,.9); margin-top: 8px; line-height: 1.6; }
.tm-profile-edit-btn { position: absolute; top: 0; right: 0; background: rgba(255,255,255,.22); color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer; backdrop-filter: blur(4px); transition: background .15s; }
.tm-profile-edit-btn:hover { background: rgba(255,255,255,.35); }
/* 成绩单 */
.tm-profile-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 0; border-bottom: 1px solid #f1f3f5; }
.tm-stat { text-align: center; padding: 18px 8px; border-right: 1px solid #f1f3f5; }
.tm-stat:last-child { border-right: none; }
.tm-stat-icon { font-size: 22px; margin-bottom: 4px; }
.tm-stat-num { font-size: 24px; font-weight: 800; color: #212529; line-height: 1.2; }
.tm-stat-num small { font-size: 13px; color: #868e96; font-weight: 600; }
.tm-stat-label { font-size: 11.5px; color: #868e96; margin-top: 3px; }
/* 区块 */
.tm-profile-section { padding: 8px 20px 20px; }
.tm-profile-section-title { font-size: 15px; font-weight: 700; padding: 14px 0 10px; color: #343a40; border-bottom: 2px solid #f1f3f5; margin-bottom: 12px; }
/* 省份标签 */
.tm-province-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-province-tag { background: linear-gradient(135deg, #e7f5ff, #d0ebff); color: #1971c2; padding: 4px 12px; border-radius: 14px; font-size: 12.5px; font-weight: 600; }
/* 空状态 */
.tm-profile-empty { padding: 30px 20px; text-align: center; color: #adb5bd; font-size: 14px; }
/* 行程墙 */
.tm-journey-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tm-journey-card { display: block; background: #fff; border: 1px solid #f1f3f5; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; transition: all .2s; }
.tm-journey-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.1); border-color: #d0ebff; }
.tm-jc-cover { width: 100%; aspect-ratio: 16/10; overflow: hidden; background: #e9ecef; }
.tm-jc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tm-journey-card:hover .tm-jc-cover img { transform: scale(1.05); }
.tm-jc-no-cover { display: flex; align-items: center; justify-content: center; font-size: 36px; color: #ced4da; background: linear-gradient(135deg,#f8f9fa,#e9ecef); }
.tm-jc-body { padding: 12px 14px; }
.tm-jc-title { font-size: 14.5px; font-weight: 700; color: #212529; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.tm-jc-lock { font-size: 12px; }
.tm-jc-meta { font-size: 12.5px; color: #495057; margin-top: 5px; font-weight: 500; }
.tm-jc-date { font-size: 11.5px; color: #adb5bd; margin-top: 3px; }
/* 编辑弹窗 */
.tm-avatar-upload { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.tm-avatar-upload img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid #e9ecef; }
/* 404 */
.tm-profile-404 { text-align: center; padding: 70px 20px; background: #fff; border-radius: 18px; }
.tm-404-icon { font-size: 56px; margin-bottom: 16px; }
.tm-profile-404 h2 { color: #343a40; margin-bottom: 8px; }
.tm-profile-404 p { color: #868e96; margin-bottom: 20px; }
/* 足迹页用户入口 */
.tm-fp-user { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; margin-right: 8px; }
.tm-fp-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.tm-fp-uname { font-size: 13.5px; font-weight: 600; color: #fff; }
/* 响应式 */
@media (max-width: 600px) {
    .tm-profile-stats { grid-template-columns: repeat(3, 1fr); }
    .tm-stat { border-bottom: 1px solid #f1f3f5; }
    .tm-stat:nth-child(3n) { border-right: none; }
}
@media (max-width: 420px) {
    .tm-journey-wall { grid-template-columns: 1fr; }
    .tm-profile-hero { flex-direction: column; text-align: center; }
    .tm-profile-no { justify-content: center; }
}

/* 弹窗中的按钮文字提示等 */
.tm-popup-actions { margin-top: 8px; }
.leaflet-popup-content .tm-btn-sm { font-size: 12px; padding: 4px 10px; }

/* ================= v3.11.0 照片导入 ================= */
.tm-import-box { max-width: 680px; width: 90vw; max-height: 88vh; overflow-y: auto; }
.tm-imp-step { padding: 8px 0; }
.tm-imp-tip { color: #868e96; font-size: 13px; line-height: 1.6; margin: 12px 0; }
.tm-imp-selected { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: #495057; }
.tm-imp-title-input { width: 100%; padding: 10px 12px; border: 1px solid #dee2e6; border-radius: 8px; font-size: 15px; margin-bottom: 14px; box-sizing: border-box; }
.tm-imp-groups { max-height: 50vh; overflow-y: auto; }
.tm-imp-group { background: #f8f9fa; border-radius: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid #e9ecef; }
.tm-imp-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tm-imp-gname { flex: 1; min-width: 140px; padding: 6px 10px; border: 1px solid #dee2e6; border-radius: 6px; font-size: 14px; }
.tm-imp-gmeta { font-size: 12px; color: #868e96; white-space: nowrap; }
.tm-imp-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-imp-photo { position: relative; width: 80px; height: 80px; border-radius: 6px; overflow: hidden; background: #e9ecef; }
.tm-imp-photo img { width: 100%; height: 100%; object-fit: cover; }
.tm-imp-photo-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: none; font-size: 11px; cursor: pointer; line-height: 18px; padding: 0; }
.tm-imp-orphans { margin-top: 16px; padding-top: 12px; border-top: 2px dashed #dee2e6; }
.tm-imp-orphan-title { font-size: 14px; font-weight: 600; color: #e67700; margin-bottom: 10px; }
.tm-imp-orphan-sub { display: block; font-weight: 400; font-size: 12px; line-height: 1.6; color: #a18267; margin-top: 4px; }
.tm-imp-orphan-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-imp-orphan-photo { opacity: .92; }
.tm-imp-ob-bucket { margin-bottom: 12px; }
.tm-imp-ob-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 6px; font-size: 12.5px; color: #868e96; }
.tm-imp-ob-head span { white-space: nowrap; }
.tm-imp-photo-loc { position: absolute; left: 2px; bottom: 2px; height: 22px; padding: 0 5px; border: none; border-radius: 6px; background: rgba(102,126,234,.92); color: #fff; font-size: 11px; line-height: 22px; cursor: pointer; }
/* v3.11.4 手动地图选点覆盖层 */
#tm-imp-pickview { position: absolute; inset: 0; z-index: 5; display: none; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; }
.tm-imp-pv-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #2b2d42; color: #fff; font-size: 13px; }
.tm-imp-pv-bar span { flex: 1; min-width: 0; line-height: 1.4; }
.tm-imp-pv-x { flex: none; width: 28px; height: 28px; border: none; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 14px; cursor: pointer; }
#tm-imp-pv-map { flex: 1 1 auto; min-height: 280px; width: 100%; background: #e9ecef; }
.tm-imp-pv-foot { flex: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #e9ecef; background: #fff; }
.tm-imp-pv-thumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.tm-imp-pv-thumbs img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.tm-imp-pv-more { font-size: 12px; color: #868e96; }
.tm-imp-pv-addr { font-size: 13px; color: #495057; line-height: 1.5; min-height: 20px; margin-bottom: 10px; }
.tm-imp-pv-btns { display: flex; justify-content: space-between; gap: 10px; }
.tm-imp-pv-btns .tm-btn { flex: 1; }
.tm-imp-empty { text-align: center; padding: 30px; color: #adb5bd; }
/* v3.11.2 定位识别诊断面板 */
.tm-imp-diag { margin-top: 14px; border: 1px solid #f3c6d8; border-radius: 10px; background: #fff7fa; }
.tm-imp-diag summary { padding: 10px 12px; font-size: 13px; font-weight: 600; color: #be185d; cursor: pointer; list-style: none; user-select: none; }
.tm-imp-diag summary::-webkit-details-marker { display: none; }
.tm-imp-diag summary::before { content: '▸ '; }
.tm-imp-diag details[open] > summary::before { content: '▾ '; }
.tm-imp-diag-advice { margin: 0 12px; padding: 9px 11px; background: #fff; border: 1px dashed #f0a8c0; border-radius: 8px; font-size: 12.5px; line-height: 1.65; color: #9d174d; }
.tm-imp-diag-env { padding: 8px 12px 0; font-size: 11.5px; color: #9ca3af; word-break: break-all; }
.tm-imp-diag-rows { max-height: 260px; overflow-y: auto; padding: 4px 12px 10px; }
.tm-imp-diag-row { display: flex; flex-direction: column; gap: 1px; padding: 7px 0; border-bottom: 1px dashed #f3d9e3; font-size: 11.5px; line-height: 1.5; }
.tm-imp-diag-row:last-child { border-bottom: 0; }
.tm-imp-diag-row b { font-size: 12px; color: #374151; font-weight: 600; word-break: break-all; }
.tm-imp-diag-row span { color: #6b7280; word-break: break-all; }
.tm-imp-actions { display: flex; justify-content: space-between; margin-top: 16px; gap: 10px; }
.tm-imp-progress { margin: 20px 0; }
.tm-imp-progress-bar { width: 100%; height: 12px; background: #e9ecef; border-radius: 6px; overflow: hidden; }
.tm-imp-progress-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); width: 0; transition: width .3s; border-radius: 6px; }
.tm-imp-progress-text { text-align: center; margin-top: 8px; font-size: 14px; color: #495057; }
.tm-btn-danger { background: #fff5f5; color: #c92a2a; border: 1px solid #ffa8a8; }
.tm-btn-danger:hover { background: #ffe3e3; }

@media (max-width: 600px) {
    .tm-journey-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: auto;
        width: 100%;
        max-width: 100%;
        height: 70vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 28px rgba(0,0,0,.16);
        animation: tmPanelUp .22s ease;
    }
    body.admin-bar .tm-journey-panel {
        top: auto;
        bottom: 0;
        height: calc(70vh - 46px);
    }
    @keyframes tmPanelUp {
        from { transform: translateY(30px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    .tm-link-count { width: 100%; }
}

/* ============== 2026-09-04 v2.0.2 加：单条旅程嵌入（[travel_journey]） ============== */

/* 嵌入整体（文章配图级：克制、不抢正文） */
.tm-journey-embed {
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
    box-sizing: border-box;
    color: #2c3e50;
    margin: 16px 0;
}
.tm-journey-embed * { box-sizing: border-box; }

/* 顶部信息条：作者 · 旅程名（左） + 点计数 / 完整旅程链接（右） */
.tm-emb-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: #fbfcfe;
    border-bottom: 1px solid #eef1f4;
    font-size: 14px;
    line-height: 1.5;
}
.tm-emb-bar-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.12);
    flex-shrink: 0;
}
.tm-emb-bar-name { font-weight: 600; color: #57606a; flex-shrink: 0; }
.tm-emb-bar-title { font-weight: 600; color: #2c3e50; flex: 1; min-width: 120px; }
.tm-emb-bar-side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 13px;
    color: #95a5a6;
}
.tm-emb-link {
    color: #2a5298;
    text-decoration: none;
    white-space: nowrap;
}
.tm-emb-link:hover { text-decoration: underline; }

/* v2.2.0 旅程嵌入图「♡ 收藏进我的行程」按钮（跳行程猫一键转计划） */
.tm-emb-fav {
    color: #e64980;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
    border: 1px solid rgba(230, 73, 128, .45);
    border-radius: 12px;
    padding: 1px 10px;
    line-height: 1.7;
    background: rgba(230, 73, 128, .05);
}
.tm-emb-fav:hover {
    background: rgba(230, 73, 128, .12);
    text-decoration: none;
}

/* v2.2.0 旅程编辑弹窗线路类型下拉（线段 / 环线），与输入框风格统一 */
.tm-modal-box select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #2c3e50;
}
.tm-modal-box select:focus {
    outline: none;
    border-color: var(--tm-red, #e64980);
    box-shadow: 0 0 0 3px rgba(230, 73, 128, .12);
}

/* 嵌入地图容器（高度由短代码 height 参数控制） */
.tm-emb-map {
    width: 100%;
    background: #eef1f4;
    z-index: 1;
}

/* 嵌入点标记：中间旅程色圆点 / 起终徽标 */
.tm-emb-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.tm-emb-flag {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 18px;
    border-radius: 50%;
    text-align: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* 嵌入占位（旅程不存在 / 私密 / 缺 id） */
.tm-emb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9fb;
    border: 1px dashed #c6cdd4;
}
.tm-emb-placeholder-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8a929a;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}
.tm-emb-placeholder-icon { font-size: 18px; }
.tm-emb-placeholder-msg { line-height: 1.6; }

/* 打卡点照片：缩略图 + 点击大图遮罩 */
.tm-popup-photo {
    display: block;
    margin-top: 8px;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    cursor: zoom-in;
}
.tm-photo-ov {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}
.tm-photo-ov img {
    max-width: 94vw;
    max-height: 92vh;
    border-radius: 6px;
    box-shadow: 0 6px 30px rgba(0,0,0,.5);
}
.tm-photo-ov-close {
    position: fixed;
    top: 14px;
    right: 18px;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    opacity: .85;
}
.tm-photo-ov-close:hover { opacity: 1; }

@media (max-width: 600px) {
    .tm-emb-bar { font-size: 13px; }
    .tm-emb-bar-side { width: 100%; justify-content: flex-end; }
}

/* ================= v2.0.3 全屏打卡地图模板（无主题外壳） ================= */
body.tm-fullscreen-body {
    margin: 0;
    padding: 0;
    background: #dfe4ea;
    overflow: hidden;   /* 页面自身不滚动，地图内部平移缩放 */
}
body.tm-fullscreen-body #tm-app.tm-app {
    max-width: none;
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
}
/* WP 管理栏浮在顶部时，应用正好从它下方开始 */
body.tm-fullscreen-body.admin-bar #tm-app.tm-app {
    height: calc(100vh - 32px);
    margin-top: 32px;
}
@media screen and (max-width: 782px) {
    body.tm-fullscreen-body.admin-bar #tm-app.tm-app {
        height: calc(100vh - 46px);
        margin-top: 46px;
    }
}
body.tm-fullscreen-body .tm-toolbar {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 14px;
    background: #fbfcfe;
    border-bottom: 1px solid #e4e8ec;
}
body.tm-fullscreen-body #tm-top-wrap { flex: 0 0 auto; }
body.tm-fullscreen-body #tm-link-bar {
    flex: 0 0 auto;
    margin: 0;
    border-radius: 0;
}
body.tm-fullscreen-body #tm-map.tm-map {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid #e4e8ec;
}

/* ================= v2.0.5 打卡点：编辑 / 移动位置 / 照片 ================= */

/* popup 操作按钮竖排展开 */
.tm-popup-actions-col {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.tm-popup-actions-col .tm-btn { margin: 0; }

/* 弹窗内照片上传区 */
.tm-m-photo { margin-bottom: 12px; }
.tm-m-photo-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
    margin-bottom: 6px;
}
.tm-m-photo-tip { font-size: 11px; color: #95a5a6; font-weight: 400; }
.tm-m-photo-prev { margin-bottom: 8px; }
/* v3.9.5 多图网格：横向排列可换行，每张右上角带移除 × */
.tm-m-photo-prev { gap: 8px; flex-wrap: wrap; }
.tm-m-photo-item { position: relative; flex: 0 0 auto; }
.tm-m-photo-item .tm-m-photo-img { display: block; }
.tm-m-photo-x {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(20, 24, 34, .82);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}
.tm-photo-n {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #6b7280;
    background: #f1f3f7;
    border-radius: 999px;
    padding: 1px 8px;
}
.tm-m-photo-img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    cursor: zoom-in;
}
.tm-m-photo-ops { display: flex; align-items: center; gap: 8px; }
.tm-m-photo-btn { cursor: pointer; margin: 0; }
.tm-m-photo-btn input[type="file"] { display: none; }

/* 移动位置模式：浮动提示 + 其余点淡化 + 目标点红圈高亮 */
.tm-relocate-tip {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    background: rgba(231, 76, 60, .95);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
    max-width: 92vw;
    text-align: center;
    line-height: 1.5;
}
.tm-relocate-dim { opacity: .35; }
.tm-relocate-target .tm-pin {
    box-shadow: 0 0 0 4px #fff, 0 0 0 9px rgba(231, 76, 60, .6);
}
.tm-relocate-target .tm-pin-active { background: #e74c3c; }
@media (max-width: 600px) {
    .tm-relocate-tip { top: 12px; font-size: 12px; padding: 8px 12px; }
}

/* ============================================================
   v3.9.0 手机定位打卡：准星预览态 / 权限预解释 / 弹窗扩展
   ============================================================ */

/* 全屏定位预览 */
.tm-loc-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999; /* v3.9.6：盖过主题 fixed 页头，避免顶部退出钮被登录条遮挡 */
    background: #e5eaf0;
    display: block;
}
.tm-loc-overlay .tm-loc-map { position: absolute; inset: 0; background: #e5eaf0; }
.tm-loc-overlay .leaflet-bar { border: none; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.tm-loc-overlay .leaflet-bar a {
    width: 42px; height: 42px; line-height: 42px;
    font-size: 20px; color: #2c3e50;
}

/* 中心十字准星 */
.tm-loc-cross {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 22px; height: 22px;
    z-index: 500;
    pointer-events: none;
}
.tm-loc-cross::before,
.tm-loc-cross::after {
    content: '';
    position: absolute;
    background: rgba(38, 116, 255, .9);
}
.tm-loc-cross::before { left: 50%; top: -13px; width: 2px; height: 48px; transform: translateX(-50%); }
.tm-loc-cross::after  { top: 50%; left: -13px; height: 2px; width: 48px; transform: translateY(-50%); }
.tm-loc-cross span {
    position: absolute;
    left: 50%; top: 50%;
    width: 10px; height: 10px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #2674ff;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
}

/* 关闭按钮 */
.tm-loc-close {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    left: 14px;
    z-index: 520;
    width: 40px; height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #2c3e50;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    cursor: pointer;
}

/* 顶部状态条（定位中 / 失败） */
.tm-loc-status {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 510;
    max-width: calc(100vw - 120px);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.tm-loc-status.tm-loc-loading {
    background: rgba(44, 62, 80, .9);
    color: #fff;
}
.tm-loc-status.tm-loc-error {
    background: rgba(255, 248, 235, .98);
    color: #8a5a00;
    border: 1px solid #f0d8a8;
    border-radius: 12px;
}
.tm-loc-status-sub { font-size: 12px; color: #a07a2e; }

/* 底部操作条 */
.tm-loc-bar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 520;
    background: #fff;
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 16px rgba(0,0,0,.12);
    border-radius: 16px 16px 0 0;
}
.tm-loc-info { min-height: 38px; margin-bottom: 10px; }
.tm-loc-addr {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tm-loc-acc { font-size: 12px; color: #7f8c8d; margin-top: 2px; }
.tm-loc-acc-warn { color: #d68a00; }
.tm-loc-actions { display: flex; gap: 10px; }
.tm-loc-actions button {
    flex: 1;
    height: 46px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
}
.tm-loc-retry {
    background: #f1f3f6;
    color: #2c3e50;
}
.tm-loc-confirm {
    background: #2674ff;
    color: #fff;
    font-weight: 600;
}
.tm-loc-confirm:disabled,
.tm-loc-retry:disabled { opacity: .5; cursor: default; }

/* 权限预解释弹层（高于定位预览） */
.tm-loc-explain-mask {
    position: fixed;
    inset: 0;
    /* v3.18.4：必须高于 .tm-loc-overlay(99999)。旧值 10001 会被全屏打卡地图盖住，
       用户既看不到权限询问/诊断面板也点不到按钮，表现为卡死在「正在获取定位…」。 */
    z-index: 100001;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}
.tm-loc-explain {
    background: #fff;
    border-radius: 16px;
    padding: 26px 22px 22px;
    max-width: 340px;
    text-align: center;
}
.tm-loc-explain-ico { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.tm-loc-explain-t { font-size: 17px; font-weight: 600; color: #2c3e50; margin-bottom: 10px; }
.tm-loc-explain-d { font-size: 13px; color: #667; line-height: 1.7; margin-bottom: 20px; }
.tm-loc-explain-ok {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: #2674ff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 弹窗内：手机端重新定位按钮（JS 按 isMobileUI 控制显隐） */
.tm-modal-box { position: relative; }
.tm-m-loc-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    padding: 5px 10px;
    font-size: 12px;
}

/* EXIF 提示条 */
.tm-m-exif-tip {
    margin: 6px 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
    background: #f4f8ff;
    border: 1px solid #d6e4ff;
    color: #34588e;
}
.tm-m-exif-tip.tm-m-exif-warn { background: #fff8eb; border-color: #f0d8a8; color: #8a5a00; }
.tm-m-exif-tip.tm-m-exif-near { background: #f0faf3; border-color: #bfe6cd; color: #27723d; }
.tm-m-exif-tip button {
    border: none;
    background: none;
    padding: 0 0 0 4px;
    color: #2674ff;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}
.tm-m-share-photo { display: none; }
.tm-m-share-photo.tm-m-share-on { display: flex; }

/* v3.9.0 弱网待补发打卡横幅（手机端，固定底部） */
.tm-pending-bar {
    display: none;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 9999;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(38, 50, 72, 0.95);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.tm-pending-bar b { color: #ffd98a; }
.tm-pending-bar .tm-pending-act { color: #8fc1ff; }
.tm-pending-bar.tm-pending-busy { cursor: default; opacity: 0.9; }
@media (max-width: 600px) {
    .tm-m-loc-btn span { display: none; }
    .tm-m-loc-btn { padding: 5px 9px; }
}

/* ================= v3.9.1 旅程状态流（draft 进行中） ================= */

/* 打卡弹窗：旅程勾选行 */
.tm-m-journey-line { color: #a04070; font-size: 13px; }
.tm-m-journey-line input { accent-color: #e64980; }
#tm-m-journey-name { color: #777; }
/* v3.9.10：「开启一段新旅程」粉色虚线卡片突出显示（放默认勾选的「继续现有旅程」之后） */
.tm-m-journey-new {
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px dashed #e64980;
    border-radius: 8px;
    background: #fff0f6;
    color: #d6336c;
    font-size: 13px;
    line-height: 1.5;
}
.tm-m-journey-new input { accent-color: #e64980; }

/* 「进行中」小标签（弹窗 / popup / 列表共用） */
.tm-draft-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 8px;
    background: #ffe3ef;
    color: #d6336c;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    vertical-align: 1px;
}

/* 顶部「旅程进行中」胶囊条 */
.tm-draft-bar {
    display: none;
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    max-width: calc(100vw - 20px);
    align-items: center;
    gap: 10px;
    padding: 7px 10px 7px 12px;
    border-radius: 999px;
    background: rgba(38, 50, 72, 0.94);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    -webkit-tap-highlight-color: transparent;
}
.tm-draft-bar b { color: #ffd0e4; font-weight: 600; }
/* v3.15.7：登录用户顶部有 WP admin bar（PC 32px / 手机 46px），胶囊条下移避开，否则被盖住 */
body.admin-bar .tm-draft-bar { top: 44px; }
@media (max-width: 782px) {
    body.admin-bar .tm-draft-bar { top: 54px; }
}
.tm-draft-ops { display: inline-flex; gap: 6px; }
.tm-draft-ops .tm-btn { white-space: nowrap; }
.tm-draft-text { white-space: nowrap; min-width: 0; }
/* v3.9.3 手机端胶囊：强制单行紧凑，标题截断，避免竖排换行挤压 */
@media (max-width: 768px) {
    .tm-draft-bar {
        top: 8px;
        gap: 6px;
        padding: 5px 6px 5px 10px;
        font-size: 12px;
        white-space: nowrap;
        max-width: calc(100vw - 16px);
    }
    .tm-draft-text {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .tm-draft-bar b {
        display: inline-block;
        max-width: 30vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }
    .tm-draft-ops .tm-btn {
        font-size: 12px;
        padding: 3px 9px;
    }
}
.tm-draft-dot {
    width: 9px; height: 9px; flex: 0 0 9px;
    border-radius: 50%;
    background: #ff5c8d;
    box-shadow: 0 0 0 0 rgba(255, 92, 141, 0.7);
    animation: tm-live-pulse 1.5s infinite;
}
@keyframes tm-live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 92, 141, 0.65); }
    70%  { box-shadow: 0 0 0 8px rgba(255, 92, 141, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 92, 141, 0); }
}

/* 地图上的进行中旅程虚线呼吸 */
.tm-route-draft {
    animation: tm-draft-breathe 1.6s ease-in-out infinite;
}
@keyframes tm-draft-breathe {
    0%, 100% { stroke-opacity: 0.95; }
    50%      { stroke-opacity: 0.55; }
}

/* 旅程列表：进行中卡片 */
.tm-jc-draft {
    border-color: #f7b0cd;
    background: #fff7fb;
}
.tm-jc-dot-live {
    position: relative;
    animation: tm-live-pulse 1.5s infinite;
}

/* 结束旅程弹窗：色板与按钮排布 */
.tm-f-colors { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tm-f-actions { flex-wrap: wrap; }
@media (max-width: 480px) {
    .tm-f-actions .tm-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-draft-dot, .tm-jc-dot-live, .tm-route-draft { animation: none; }
}

/* v3.9.1 旅程显隐工具条 */
.tm-jp-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    font-size: 13px;
}
.tm-jp-tools .tm-checkbox { margin: 0; color: #555; white-space: nowrap; }

/* 被折叠 / 隐藏的旅程列表项 */
.tm-jc-offmap { opacity: 0.55; }
.tm-jc-offnote { color: #999; font-size: 11px; }
.tm-jc-eye { min-width: 34px; padding-left: 6px; padding-right: 6px; }

/* v3.16.0：攻略页行程介绍/总结内联编辑面板 + toast */
.tmg-summary-edit { margin-left: auto; background: none; border: 1px dashed #d0d0d8; color: #888; border-radius: 14px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.tmg-summary-edit:hover { color: #e64980; border-color: #e64980; }
.tmg-summary-empty { color: #aaa; font-size: 13px; font-style: italic; }
.tmg-sumedit-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(20,20,30,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tmg-sumedit-box { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.tmg-sumedit-box h3 { margin: 0 0 14px; font-size: 17px; }
.tmg-sumedit-lb { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: #444; }
.tmg-sumedit-lb select, .tmg-sumedit-lb textarea { display: block; width: 100%; margin-top: 5px; border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; font-weight: 400; box-sizing: border-box; }
.tmg-sumedit-lb textarea { resize: vertical; line-height: 1.6; }
.tmg-sumedit-actions { display: flex; gap: 10px; margin-top: 16px; }
.tmg-sumedit-save { flex: 1; background: #e64980; color: #fff; border: 0; border-radius: 8px; padding: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.tmg-sumedit-save:disabled { opacity: .6; cursor: default; }
.tmg-sumedit-cancel { background: #f1f3f5; color: #555; border: 0; border-radius: 8px; padding: 10px 18px; font-size: 14px; cursor: pointer; }
.tmg-sumedit-msg { margin-top: 10px; font-size: 13px; }
.tmg-sum-toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(20px); z-index: 3500; background: rgba(30,30,40,.92); color: #fff; padding: 9px 18px; border-radius: 20px; font-size: 14px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
.tmg-sum-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= v3.17.0：一个点加入多段旅程 ================= */

/* 共用点：中性白针 + 右下角多色小点（最多 2 个，余显 +N） */
.tm-pin-shared { background: #ffffff !important; }
.tm-pin-dots {
    position: absolute;
    right: -5px;
    bottom: 1px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 2px;
}
.tm-pin-dots > i {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 0 2px rgba(0,0,0,.45);
}
.tm-pin-dots > i.tm-pin-dots-n {
    width: auto;
    min-width: 9px;
    height: 14px;
    line-height: 14px;
    padding: 0 3px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #57606a !important;
    color: #fff;
    font-style: normal;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

/* 气泡内「属于：X线·第N站」 */
.tm-popup-belongs {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 11px;
    color: #8a6d3b;
    line-height: 1.4;
}
.tm-popup-belong { display: inline-flex; align-items: center; gap: 4px; background: #f7f8fa; border-radius: 10px; padding: 1px 8px 1px 6px; }
.tm-popup-belong > i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* 连线队列：每行到访日期下拉 */
.tm-jq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tm-jq-date {
    width: fit-content;
    max-width: 100%;
    font-size: 11px;
    color: #7a5a00;
    background: #fff8e1;
    border: 1px solid #f0e2a8;
    border-radius: 9px;
    padding: 1px 6px;
    line-height: 1.5;
}

/* 加入旅程：目标路线选择卡 */
.tm-ar-box, .tm-ad-box { max-width: 420px; width: calc(100vw - 40px); }
.tm-ar-tip { font-size: 13px; color: #666; line-height: 1.6; margin: 8px 0 12px; }
.tm-btn-block { display: block; width: 100%; margin-top: 10px; }
.tm-ar-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin-bottom: 4px; }
.tm-ar-empty { font-size: 13px; color: #999; text-align: center; padding: 18px 8px; background: #f8f9fa; border-radius: 10px; }
.tm-ar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: #f8f9fa;
    border: 1.5px solid #eceff3;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.tm-ar-item:hover { border-color: #e64980; background: #fdf3f8; }
.tm-ar-item.tm-ar-in { background: #f4faf6; border-color: #bfe3cd; }
.tm-ar-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.tm-ar-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tm-ar-meta b { font-size: 14px; color: #2c3e50; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-ar-meta small { font-size: 11px; color: #95a5a6; }
.tm-ar-state { font-size: 12px; color: #e64980; white-space: nowrap; flex-shrink: 0; }
.tm-ar-in .tm-ar-state { color: #2f9e44; }
.tm-ar-static { cursor: default; }
.tm-ar-static:hover { border-color: #bfe3cd; background: #f4faf6; }

/* 加入旅程：日期选择 */
.tm-ad-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; }
.tm-ad-day {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #f8f9fa;
    border: 1.5px solid #eceff3;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
}
.tm-ad-day:hover { border-color: #e64980; background: #fdf3f8; }
.tm-ad-day b {
    width: 34px; height: 34px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #e64980; color: #fff;
    font-size: 13px;
}
.tm-ad-day.tm-ad-own b { background: #f76707; }
.tm-ad-day span { flex: 1; font-size: 14px; color: #2c3e50; }
.tm-ad-day i { font-style: normal; font-size: 11px; color: #95a5a6; white-space: nowrap; }
@media (max-width: 480px) {
    .tm-ad-day i { display: none; }
}
