/* 行程猫 travel-map-planner 前端样式 v1.0.0 */
/* 前缀 tmpl- 避免与主题/打卡插件冲突 */

:root {
    --tmpl-blue: #3b82f6;
    --tmpl-blue-dark: #2563eb;
    --tmpl-wx: #07c160;
    --tmpl-wx-dark: #06ad56;
    --tmpl-red: #ef4444;
    --tmpl-red-dark: #dc2626;
    --tmpl-orange: #f59f00;
    --tmpl-bg: #f6f7f9;
    --tmpl-white: #fff;
    --tmpl-border: #e5e7eb;
    --tmpl-text: #1f2937;
    --tmpl-muted: #6b7280;
    --tmpl-radius: 12px;
    --tmpl-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.tmpl-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--tmpl-text);
    background: var(--tmpl-bg);
    min-height: 520px;
    border-radius: var(--tmpl-radius);
    padding: 16px;
    box-sizing: border-box;
}

.tmpl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.tmpl-page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.tmpl-toolbar-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tmpl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    text-decoration: none;
}

.tmpl-btn:hover { opacity: 0.92; }
.tmpl-btn:active { transform: translateY(1px); }

.tmpl-btn-primary { background: var(--tmpl-blue); color: #fff; }
.tmpl-btn-secondary { background: #fff; color: var(--tmpl-text); border: 1px solid var(--tmpl-border); }
.tmpl-btn-wx { background: var(--tmpl-wx); color: #fff; }
.tmpl-btn-danger { background: var(--tmpl-red); color: #fff; }
.tmpl-btn-ghost { background: transparent; color: var(--tmpl-muted); }
.tmpl-btn-ghost-danger { background: transparent; color: var(--tmpl-red); }

.tmpl-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--tmpl-border);
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}

.tmpl-topbar-msg { flex: 1; }

.tmpl-view {}

.tmpl-hide { display: none !important; }

/* 列表页 */
.tmpl-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 2px dashed var(--tmpl-border);
    border-radius: var(--tmpl-radius);
}

.tmpl-empty-icon { font-size: 48px; margin-bottom: 10px; }

.tmpl-empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tmpl-empty-sub { color: var(--tmpl-muted); }

.tmpl-empty-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* v1.1.0 B-2：从路书线路导入弹窗 */
.tmpl-route-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 46vh;
    overflow-y: auto;
    margin: 6px 0 10px;
}

.tmpl-route-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--tmpl-border);
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.tmpl-route-item:hover {
    border-color: #2563eb;
    background: #fff;
}

.tmpl-route-item.busy {
    opacity: .7;
    cursor: wait;
}

.tmpl-route-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tmpl-route-body {
    flex: 1;
    min-width: 0;
}

.tmpl-route-name {
    font-weight: 600;
    font-size: 14px;
}

.tmpl-route-sub {
    color: var(--tmpl-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tmpl-route-go {
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* v1.8.32：空骨架线路置灰 + 线路行内的天数/出发日配置面板 */
.tmpl-route-item-off {
    cursor: default;
    background: #f7f7f8;
}

.tmpl-route-item-off:hover {
    border-color: var(--tmpl-border);
    background: #f7f7f8;
}

.tmpl-route-item-off .tmpl-route-name,
.tmpl-route-item-off .tmpl-route-sub {
    color: var(--tmpl-muted);
}

.tmpl-route-go-off {
    color: var(--tmpl-muted);
    font-weight: 500;
}

.tmpl-route-cfg {
    margin: -4px 0 10px;
    padding: 12px;
    border: 1px solid #dbe4f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #f4f7fc;
}

.tmpl-route-cfg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tmpl-route-cfg-row label {
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.tmpl-route-cfg-row .tmpl-route-days {
    width: 84px;
    margin-top: 0;
}

.tmpl-route-cfg-row .tmpl-route-date {
    width: 170px;
    margin-top: 0;
}

.tmpl-route-cfg-hint {
    color: var(--tmpl-muted);
    font-size: 12px;
}

.tmpl-route-cfg .tmpl-modal-actions {
    margin: 10px 0 0;
    justify-content: flex-end;
}

/* v1.1.0 B-1：计划内状态引导提示条 */
.tmpl-plan-tip {
    margin: 10px 0 0;
}

.tmpl-plan-tip:empty {
    display: none;
}

.tmpl-plan-tip-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e40af;
    font-size: 13px;
}

.tmpl-plan-tip-inner .tmpl-btn {
    margin-left: auto;
}

.tmpl-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.tmpl-card {
    background: #fff;
    border: 1px solid var(--tmpl-border);
    border-radius: var(--tmpl-radius);
    padding: 16px;
    box-shadow: var(--tmpl-shadow);
    cursor: pointer;
    transition: transform 0.15s;
    position: relative;
}

.tmpl-card:hover { transform: translateY(-2px); }

.tmpl-card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tmpl-card-meta {
    color: var(--tmpl-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.tmpl-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tmpl-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--tmpl-bg);
    color: var(--tmpl-muted);
    border: 1px solid var(--tmpl-border);
}

.tmpl-badge-public { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

/* 计划视图 */
.tmpl-planbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--tmpl-border);
    border-radius: 10px;
}

.tmpl-planbar-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tmpl-planbar-meta {
    color: var(--tmpl-muted);
    font-size: 13px;
}

/* v1.7.5：层级导航默认 PC 隐藏 */
.tmpl-planbar-crumbs { display: none; }

/* v1.7.6：所有行程猫页面隐藏主题的页头标题与面包屑（PC+手机；应用内已有完整标题导航） */
body.tmpl-app-page .page-title,
body.tmpl-app-page .entry-title,
body.tmpl-app-page h1.entry-title,
body.tmpl-app-page .thrive-breadcrumbs,
body.tmpl-app-page .breadcrumbs,
body.tmpl-app-page nav.breadcrumbs,
body.tmpl-app-page .tve-page-section-breadcrumbs { display: none !important; }

/* v1.7.7：具体行程编辑页（body.tmpl-plan-mode）兜底隐藏各种可能的面包屑容器 */
body.tmpl-plan-mode .breadcrumb,
body.tmpl-plan-mode .breadcrumb-navxt,
body.tmpl-plan-mode .breadcrumbs,
body.tmpl-plan-mode nav.breadcrumbs,
body.tmpl-plan-mode [class*="breadcrumb"],
body.tmpl-plan-mode .thrive-breadcrumbs,
body.tmpl-plan-mode .tve-page-section-breadcrumbs { display: none !important; }

.tmpl-planbar-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.tmpl-map-wrap {
    position: relative;
    height: 420px;
    background: #eef2f7;
    border-radius: var(--tmpl-radius);
    overflow: hidden;
    border: 1px solid var(--tmpl-border);
    margin-bottom: 14px;
}

.tmpl-map {
    width: 100%;
    height: 100%;
}

.tmpl-map.tmpl-placing { cursor: crosshair; }

/* v1.6.7：地图组件加载失败遮罩 */
.tmpl-map-loadfail {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(238, 242, 247, 0.95);
    z-index: 500;
}

.tmpl-map-loadfail-t { color: var(--tmpl-muted); font-size: 14px; }

.tmpl-map-tip {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 500;
    pointer-events: none;
}

/* 天横条 */
.tmpl-daybar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.tmpl-day-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 24px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.tmpl-day-chip:hover { background: #f3f4f6; }

.tmpl-day-chip.tmpl-active {
    background: #eff6ff;
    border-color: var(--tmpl-blue);
    font-weight: 600;
}

.tmpl-day-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.tmpl-day-add {
    border-color: var(--tmpl-border);
    color: var(--tmpl-muted);
}

/* 面板 */
.tmpl-panel {
    background: #fff;
    border: 1px solid var(--tmpl-border);
    border-radius: var(--tmpl-radius);
    padding: 16px;
}

.tmpl-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tmpl-panel-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.tmpl-panel-sub { color: var(--tmpl-muted); font-size: 13px; }

.tmpl-stop-list { display: flex; flex-direction: column; gap: 10px; }

.tmpl-stop-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--tmpl-border);
    border-radius: 10px;
    background: #fafafa;
}

.tmpl-stop-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.tmpl-stop-body { flex: 1; }

.tmpl-stop-name { font-weight: 600; font-size: 14px; }

.tmpl-stop-note { color: var(--tmpl-muted); font-size: 12px; margin-top: 2px; }

/* v1.1.0：站点列表「编辑」按钮 */
.tmpl-stop-item .tmpl-stop-ops {
	flex-shrink: 0;
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 6px;
}

.tmpl-stop-item .tmpl-stop-ops .tmpl-btn {
	padding: 2px 8px;
	font-size: 12px;
}

/* v1.1.0：站点弹窗「归属日期」下拉 */
.tmpl-modal label select {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid var(--tmpl-border);
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	color: #333;
}

.tmpl-stop-empty {
    color: var(--tmpl-muted);
    text-align: center;
    padding: 30px 10px;
    font-size: 14px;
}

/* Leaflet pin */
.tmpl-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.tmpl-pin span {
    transform: rotate(45deg);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* popup */
.tmpl-popup { font-size: 13px; min-width: 140px; }
.tmpl-popup-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tmpl-popup-note { color: var(--tmpl-muted); margin-bottom: 8px; }
.tmpl-popup-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* modal */
.tmpl-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tmpl-modal.tmpl-show { display: flex !important; } /* !important 覆盖 HTML 上的内联 display:none */

.tmpl-modal-box {
    background: #fff;
    border-radius: var(--tmpl-radius);
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.tmpl-modal-box h3 { margin: 0 0 16px; font-size: 18px; }

/* v1.8.11：未注册游客的编辑计划提示条 */
.tmpl-guest-tip {
    margin: 0 0 14px; padding: 10px 12px;
    background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px;
    font-size: 12.5px; line-height: 1.6; color: #6d5a00;
}
.tmpl-guest-tip strong { color: #b26a00; }
.tmpl-guest-tip-link {
    display: inline-block; margin-left: 6px;
    color: var(--tmpl-blue); font-weight: 600; text-decoration: none;
}
.tmpl-guest-tip-link:hover { text-decoration: underline; }

/* v1.8.14：stop 弹窗坐标行 + 移动位置按钮 */
.tmpl-stop-coords-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 12px; flex-wrap: wrap;
}
.tmpl-stop-coords {
    font-size: 12px; color: #888;
    background: #f5f5f5; padding: 4px 10px; border-radius: 4px;
}

/* v1.8.20：到访记录时间线 */
.tmpl-checkin-history { margin-bottom: 12px; }
.tmpl-checkin-history-title { font-size: 13px; font-weight: 700; color: #e64980; margin-bottom: 8px; }
.tmpl-checkin-item {
    border-left: 3px solid #e64980; padding: 8px 12px; margin-bottom: 8px;
    background: #fafafa; border-radius: 0 6px 6px 0;
}
.tmpl-checkin-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tmpl-checkin-date { font-size: 12px; font-weight: 600; color: #555; }
.tmpl-checkin-del {
    font-size: 11px; color: #ef4444; background: none; border: none;
    cursor: pointer; padding: 2px 6px; border-radius: 3px;
}
.tmpl-checkin-del:hover { background: #fee2e2; }
.tmpl-checkin-desc { font-size: 13px; line-height: 1.5; color: #333; }
.tmpl-checkin-photos { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tmpl-checkin-photo { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }

.tmpl-modal label {
    display: block;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--tmpl-text);
}

.tmpl-modal input[type="text"],
.tmpl-modal input[type="date"],
.tmpl-modal input[type="number"],
.tmpl-modal textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--tmpl-border);
    border-radius: 8px;
    font-size: 14px;
    margin-top: 5px;
    box-sizing: border-box;
    font-family: inherit;
}

.tmpl-modal textarea { resize: vertical; }

.tmpl-req { color: var(--tmpl-red); }

.tmpl-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.tmpl-checkbox input { margin: 0; }

.tmpl-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.tmpl-flex-1 { flex: 1; }

.tmpl-modal-tip {
    color: var(--tmpl-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}

/* share / poster */
.tmpl-share-box { max-width: 420px; }

/* v1.9.0：Canvas 竖版海报（与「路书」海报同款：封面 + 路线示意 + 二维码） */
.tmpl-poster {
    background: #fff;
    border: 1px solid var(--tmpl-border);
    border-radius: var(--tmpl-radius);
    padding: 10px;
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.tmpl-poster-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    -webkit-touch-callout: default;
    touch-callout: default;
}

.tmpl-poster-loading {
    width: 100%;
    text-align: center;
    color: var(--tmpl-muted);
    font-size: 14px;
    padding: 80px 0;
}

.tmpl-share-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}

/* toast */
.tmpl-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

.tmpl-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.tmpl-toast-err { background: rgba(220, 38, 38, 0.9); }

/* responsive */
@media (max-width: 640px) {
    .tmpl-toolbar { flex-direction: column; align-items: flex-start; }
    .tmpl-map-wrap { height: 260px; } /* v1.7.3：统一矮图（吸顶区另有限高规则） */
    .tmpl-planbar { flex-direction: column; align-items: flex-start; }
    /* v1.7.2：手机端按钮两列网格，等宽对齐不挤行 */
    .tmpl-planbar-actions { margin-left: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .tmpl-planbar-actions .tmpl-btn { width: 100%; justify-content: center; }
    .tmpl-card-grid { grid-template-columns: 1fr; }
    .tmpl-modal-box { padding: 16px; }
}

/* 放置模式的跟随十字准星 */
.tmpl-cross-v,
.tmpl-cross-h,
.tmpl-cross-dot {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    z-index: 800;
}
.tmpl-cross-v {
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(37, 99, 235, 0.4);
}
.tmpl-cross-h {
    left: 0;
    top: 50%;
    height: 1px;
    width: 100%;
    background: rgba(37, 99, 235, 0.4);
}
.tmpl-cross-dot {
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--tmpl-blue);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
}

/* 落点临时标记：十字 + 中心脉冲红点 */
.tmpl-temp-marker {
    background: transparent !important;
    border: 0 !important;
}
.tmpl-temp-cross {
    display: block;
    position: relative;
    width: 30px;
    height: 30px;
}
.tmpl-temp-cross::before,
.tmpl-temp-cross::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    background: #fff;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.9);
}
.tmpl-temp-cross::before {
    width: 30px;
    height: 2px;
    margin: -1px 0 0 -15px;
}
.tmpl-temp-cross::after {
    width: 2px;
    height: 30px;
    margin: -15px 0 0 -1px;
}
.tmpl-temp-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--tmpl-red);
    border: 2px solid #fff;
    z-index: 2;
    animation: tmplPulse 1.1s infinite;
}
@keyframes tmplPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* 添加地点弹窗：贴底部的小窗，留出地图能看到刚落的点（先标地点再写说明） */
#tmpl-stop-modal {
    align-items: flex-end;
    padding-bottom: 32px;
    background: rgba(15, 23, 42, 0.18);
}
#tmpl-stop-modal .tmpl-modal-box {
    max-width: 380px;
}
#tmpl-stop-modal .tmpl-modal-box h3 {
    font-size: 15px;
    margin-bottom: 10px;
}
#tmpl-stop-modal .tmpl-modal-box label {
    margin-bottom: 10px;
    font-size: 13px;
}

/* v1.3.0：计划「来源：旅程」徽标（from_journey 导入） */
.tmpl-planbar-src {
    margin-top: 6px;
}
.tmpl-src-badge {
    display: inline-block;
    font-size: 12px;
    color: #e64980;
    background: rgba(230, 73, 128, 0.08);
    border: 1px solid rgba(230, 73, 128, 0.3);
    border-radius: 12px;
    padding: 2px 10px;
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
a.tmpl-src-badge:hover {
    background: rgba(230, 73, 128, 0.16);
    text-decoration: none;
}

/* v1.3.0：旅程导入弹窗 */
.tmpl-journey-src {
    background: rgba(230, 73, 128, 0.06);
    border: 1px dashed rgba(230, 73, 128, 0.4);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}
.tmpl-journey-src-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tmpl-text);
    word-break: break-all;
}
.tmpl-journey-src-sub {
    font-size: 12px;
    color: var(--tmpl-muted);
    margin-top: 4px;
}
.tmpl-j-hint {
    font-size: 12px;
    color: var(--tmpl-muted);
    font-weight: normal;
}
.tmpl-j-guide {
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 8px;
}
.tmpl-j-guide-login {
    color: #4b7a4b;
}
.tmpl-j-guide-guest {
    color: #8a6d1a;
}

/* ===================================================================
   v1.6.0 看板式拖拽排期（PC 横列横滚；手机端纵堆，媒体查询隔离）
   =================================================================== */

/* 看板工具条：仅承载手机端「查看地图」切换；PC 下隐藏 */
.tmpl-board-toolbar {
    display: none;
    margin: 8px 0 10px;
}

.tmpl-board {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 2px 14px;
    -webkit-overflow-scrolling: touch;
}

/* v1.9.0：行程总结卡片（看板底部，全宽独立块） */
.tmpl-summary-card {
    flex: 1 1 100%;
    min-width: 100%;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--tmpl-border, #e5e7eb);
    border-radius: var(--tmpl-radius, 10px);
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.tmpl-summary-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.tmpl-summary-ico { font-size: 16px; }
.tmpl-summary-title { font-weight: 600; font-size: 14px; color: var(--tmpl-text, #111); }
.tmpl-summary-head .tmpl-icon-btn { margin-left: auto; }
.tmpl-summary-body {
    font-size: 13.5px; line-height: 1.7; color: #333;
    white-space: pre-wrap; word-break: break-word;
}
.tmpl-summary-empty { font-size: 13px; }
.tmpl-summary-editing[data-pos="top"] .tmpl-summary-field-bottom { display: none; }
.tmpl-summary-editing[data-pos="bottom"] .tmpl-summary-field-top { display: none; }
.tmpl-summary-field { margin-bottom: 10px; }
.tmpl-summary-field-label { font-size: 12px; color: #888; margin-bottom: 4px; font-weight: 600; }
.tmpl-summary-editing .tmpl-summary-text {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; border: 1px solid var(--tmpl-border, #d1d5db);
    border-radius: 6px; font-size: 13.5px; line-height: 1.6;
    resize: vertical; font-family: inherit;
}
.tmpl-summary-body { margin-bottom: 6px; }
.tmpl-summary-body-tag {
    display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px;
    background: #fde68a; color: #92400e; margin-right: 6px; font-weight: 600;
}
.tmpl-summary-pos-row {
    display: flex; align-items: center; gap: 12px;
    margin: 4px 0 12px; font-size: 13px; flex-wrap: wrap;
}
.tmpl-summary-pos-label { color: #666; }
.tmpl-summary-pos-opt { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.tmpl-summary-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.tmpl-day-col {
    flex: 0 0 280px;
    width: 280px;
    background: var(--tmpl-white);
    border: 1px solid var(--tmpl-border);
    border-radius: var(--tmpl-radius);
    box-shadow: var(--tmpl-shadow);
    display: flex;
    flex-direction: column;
    max-height: 640px;
}

.tmpl-day-col-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--tmpl-border);
    flex-wrap: wrap;
}

.tmpl-day-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

.tmpl-day-col-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tmpl-text);
}

.tmpl-day-col-theme {
    font-size: 12px;
    color: var(--tmpl-muted);
    width: 100%;
    padding-left: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tmpl-day-col-ops {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.tmpl-icon-btn {
    border: 1px solid var(--tmpl-border);
    background: var(--tmpl-bg);
    color: var(--tmpl-muted);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1;
    padding: 4px 7px;
    cursor: pointer;
}
.tmpl-icon-btn:hover { color: var(--tmpl-blue); border-color: var(--tmpl-blue); }

.tmpl-drop-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px;
    min-height: 96px;
}

.tmpl-col-empty {
    font-size: 12px;
    color: var(--tmpl-muted);
    text-align: center;
    border: 1px dashed var(--tmpl-border);
    border-radius: 8px;
    padding: 14px 8px;
}

/* 站点卡片 */
.tmpl-stop-card {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--tmpl-white);
    border: 1px solid var(--tmpl-border);
    border-radius: 10px;
    padding: 8px 8px 8px 4px;
    margin-bottom: 8px;
    user-select: none;
    -webkit-user-select: none;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tmpl-drag-handle {
    flex: 0 0 18px;
    width: 18px;
    text-align: center;
    color: #c0c4cc;
    font-size: 16px;
    line-height: 1;
    cursor: grab;
    touch-action: none;
    padding: 4px 0;
}
.tmpl-drag-handle:active { cursor: grabbing; }

.tmpl-stop-card-main {
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}
.tmpl-stop-card-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tmpl-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tmpl-stop-card-note {
    font-size: 12px;
    color: var(--tmpl-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tmpl-stop-card-ops {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
}
.tmpl-stop-card-ops .tmpl-btn-sm { padding: 3px 9px; font-size: 12px; }

/* Sortable 拖拽态（主题蓝） */
.tmpl-card-ghost {
    opacity: 0.45;
    border: 1px dashed var(--tmpl-blue) !important;
    background: rgba(59, 130, 246, 0.06);
}
.tmpl-card-chosen {
    border-color: var(--tmpl-blue);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.28);
}
.tmpl-card-drag {
    transform: rotate(1.5deg);
    opacity: 0.95;
}

/* 「加一天」尾列 */
.tmpl-day-add-col {
    flex-basis: auto;
    width: auto;
    background: transparent;
    border: 1px dashed var(--tmpl-border);
    box-shadow: none;
    justify-content: center;
    padding: 18px 14px;
    max-height: none;
}
.tmpl-add-day-btn {
    border: 0;
    background: transparent;
    color: var(--tmpl-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* 待安排口袋（想去清单） */
.tmpl-pocket-col {
    border-color: rgba(230, 73, 128, 0.45);
    background: linear-gradient(180deg, rgba(230, 73, 128, 0.05), var(--tmpl-white) 120px);
}
.tmpl-pocket-col .tmpl-day-col-title { color: #d6336c; }
.tmpl-pocket-count {
    margin-left: auto;
    font-size: 12px;
    color: #d6336c;
    background: rgba(230, 73, 128, 0.1);
    border-radius: 10px;
    padding: 1px 9px;
}
.tmpl-pocket-foot {
    padding: 8px 12px 12px;
    font-size: 12px;
    color: var(--tmpl-muted);
    text-align: center;
    line-height: 1.6;
}
.tmpl-pocket-foot .tmpl-pocket-hint {
    color: #e11d48;
    font-weight: 600;
}

/* ---------------- 手机端：纵堆（不影响 PC）；v1.7.3 起地图常显、旧折叠规则移除 ---------------- */
@media (max-width: 768px) {
    .tmpl-board {
        flex-direction: column;
        overflow-x: visible;
        gap: 10px;
        /* v1.8.7：去掉左右 2px 内边距，让天卡片与上方功能卡片左右对齐同宽 */
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 20px;
    }
    .tmpl-day-col {
        flex: 0 0 auto;
        /* v1.8.7：手机端纵堆下需占满整宽，与上方功能卡片/标题卡对齐 */
        width: 100%;
        max-height: none;
        box-sizing: border-box;
    }
    .tmpl-drop-list {
        min-height: 64px;
        max-height: 46vh;
        overflow-y: auto;
    }
    .tmpl-day-add-col { padding: 12px; }
    /* 口袋列手机端轻微吸顶，方便拖入时定位 */
    .tmpl-pocket-col {
        position: sticky;
        top: 0;
        z-index: 5;
    }

    /* ---------------- v1.7.5 手机端：地图吸顶撑满 + 标题卡片内层级导航 + 隐藏页头/面包屑/想去清单列 ---------------- */
    /* 编辑页隐藏页脚/备案号（页面只剩：地图 + 标题卡片 + 每天安排） */
    body.tmpl-plan-mode #colophon,
    body.tmpl-plan-mode footer[role="contentinfo"],
    body.tmpl-plan-mode footer.entry-meta,
    body.tmpl-plan-mode .entry-meta { display: none !important; }
    /* 隐藏 thrive 主题的页头大标题与面包屑（仅行程猫页面） */
    body.tmpl-is-mobile .page-title,
    body.tmpl-is-mobile .thrive-breadcrumbs,
    body.tmpl-is-mobile .breadcrumbs,
    body.tmpl-is-mobile nav.breadcrumbs { display: none !important; }
    /* 标题卡片内的层级导航「我的计划 › 中秋」（仅手机端显示） */
    #tmpl-view-plan .tmpl-planbar-crumbs {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }
    /* v1.8.7：返回按钮突出显示（蓝底白字主按钮观感），方便网友找到返回行程猫列表的入口 */
    #tmpl-view-plan .tmpl-crumb-back {
        background: var(--tmpl-blue);
        border: 1px solid var(--tmpl-blue);
        border-radius: 8px;
        padding: 6px 12px;
        font-size: 13px;
        font-weight: 700;
        color: #fff;
        cursor: pointer;
    }
    #tmpl-view-plan .tmpl-crumb-back:active { background: var(--tmpl-blue-dark); }
    #tmpl-view-plan .tmpl-crumb-sep { color: var(--tmpl-muted); font-size: 13px; }
    #tmpl-view-plan .tmpl-crumb-cur {
        font-size: 15px;
        font-weight: 600;
        color: var(--tmpl-text);
    }
    /* v1.8.7：可点击的当前计划名（点击=编辑标题/公开）——button 重置 + 虚线下划线暗示可点 */
    #tmpl-view-plan button.tmpl-crumb-cur {
        background: none;
        border: 0;
        padding: 0 0 1px;
        font-family: inherit;
        cursor: pointer;
        border-bottom: 1px dashed #93c5fd;
    }
    /* v1.8.7：仅手机端隐藏的元素（如顶部重复的「加一天」「编辑标题/公开」按钮） */
    .tmpl-hide-m { display: none !important; }
    /* 层级导航已含计划名，隐藏原大标题行避免重复 */
    #tmpl-view-plan .tmpl-planbar-title { display: none; }
    /* 删除看板左侧想去清单口袋列（保留列头🤍弹窗按钮） */
    #tmpl-board .tmpl-pocket-col { display: none !important; }
}

/* ================= v1.7.0 预想图 / 实拍图 / 到访打卡 ================= */

.tmpl-modal-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 14px 0 12px;
}
.tmpl-checkin-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}
.tmpl-checkin-warn {
    font-size: 12px;
    color: #d48806;
    margin: 6px 0;
}

.tmpl-photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px;
}
.tmpl-photo-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #f2f2f2;
    flex: 0 0 auto;
}
.tmpl-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tmpl-photo-mini {
    width: 56px;
    height: 56px;
}
.tmpl-photo-badge {
    position: absolute;
    left: 0;
    bottom: 0;
    font-size: 10px;
    line-height: 1;
    padding: 2px 4px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-top-right-radius: 6px;
}
.tmpl-photo-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    line-height: 18px;
    text-align: center;
    padding: 0;
    cursor: pointer;
}
.tmpl-photo-add {
    margin: 2px 0 4px;
}
.tmpl-copy-row {
    margin-top: 6px;
    font-size: 12px;
    color: #555;
}

.tmpl-stop-card-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.tmpl-stop-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.tmpl-stop-tag-on {
    color: #237804;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}
.tmpl-stop-thumb {
    margin-left: 8px;
}

@media (max-width: 768px) {
    .tmpl-photo-thumb { width: 64px; height: 64px; }
    .tmpl-photo-mini { width: 52px; height: 52px; }
    .tmpl-photo-strip { gap: 6px; }
    .tmpl-stop-thumb { margin-left: 6px; }
}

/* ===================================================================
   v1.8.6 手机端（≤768px）具体行程页「上下两区」固定舞台
   - 上部地图：左右上三边铺满视口、位置永久固定（43dvh）
   - 下部信息区：标题卡片 / 功能菜单 / 每天安排，占剩余高度并独立滚动
   仅在 body.tmpl-twozone（JS 进入计划视图 + 窄屏时添加）下生效；
   PC 端与「我的计划」列表页零影响。弹窗(2000)/toast(3000) 层级高于舞台(1000)。
   =================================================================== */
@media (max-width: 768px) {
    /* 锁住整页：页面自身不滚动，只允许 .tmpl-lower 内滚动 */
    body.tmpl-twozone {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    /* 舞台下隐藏主题页眉/页脚，地图直接贴到屏幕顶边 */
    body.tmpl-twozone #masthead,
    body.tmpl-twozone #colophon,
    body.tmpl-twozone footer[role="contentinfo"],
    body.tmpl-twozone footer.entry-meta,
    body.tmpl-twozone .entry-meta { display: none !important; }

    /* v1.8.7：隐藏 WordPress 登录用户顶部的 admin bar——它 fixed 悬浮 z-99999 会盖住地图左上角缩放按钮 */
    body.tmpl-twozone #wpadminbar { display: none !important; }

    /* 固定舞台：占满整个视口，纵向 flex 分两区（自包含，不依赖主题祖先高度链） */
    body.tmpl-twozone #tmpl-view-plan {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        background: var(--tmpl-bg);
    }

    /* 上部地图区：不缩不放、左右上铺满（去圆角去边框），固定 43dvh */
    body.tmpl-twozone #tmpl-view-plan .tmpl-map-zone {
        flex: 0 0 auto;
        width: 100%;
        height: 43vh;
        height: 43dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    /* 下部信息区：占满剩余高度（min-height:0 是 flex 内滚关键），内部独立滚动 */
    body.tmpl-twozone #tmpl-view-plan .tmpl-lower {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
        box-sizing: border-box;
    }
    body.tmpl-twozone #tmpl-view-plan .tmpl-planbar { margin-top: 0; }
}

/* ===================================================================
   v1.8.9 想去清单弹窗列表样式（此前完全无样式，勾选只靠原生 checkbox，
   部分浏览器勾选态无视觉反馈；现加整行高亮 .on 兜底，PC/手机通用）
   =================================================================== */
.tmpl-wish-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    margin: 10px 0;
}
.tmpl-wish-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--tmpl-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}
.tmpl-wish-item.on {
    background: #eff6ff;
    border-color: var(--tmpl-blue);
}
.tmpl-wish-check {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--tmpl-blue);
}
.tmpl-wish-item-name { flex: 1; min-width: 0; }
.tmpl-wish-item-tag {
    font-size: 11px;
    color: var(--tmpl-blue);
    background: #eff6ff;
    border-radius: 10px;
    padding: 1px 8px;
    flex: 0 0 auto;
}
