:root {
    --bg: #ffffff;
    --ink: #28312c;
    --muted: #78827c;
    --green: #8bbd9c;
    --green-dark: #47785b;
    --line: #d6e0d8;
    --red: #c94e4e;
    --lightred: lightcoral;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 24px;
}

.page-title {
    margin: 0 0 14px;
    padding: 0;
    line-height: 1.4;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: var(--ink);
}

.plan-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 6px;
    background: orange;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

.plan-name {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    font-size: 15px;
    color: white;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-weight: 700;
    letter-spacing: 0.6px;
}

/*
* 行程卡片：
* 使用 fieldset 的原生边框结构，
* 让 legend 所在位置自然中断边框。
* 不再使用伪元素覆盖边框。
*/
.trip-card {
    min-width: 0;
    margin: 0 0 4px;
    padding: 0 32px 2px;
    border: 1px solid #d7e2da;
    border-radius: 16px;
    background: white;
    box-shadow: 0 6px 20px rgba(29, 48, 37, .045);
}

section .trip-card:first-of-type {
    margin-top: -18px;
}

.trip-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    margin-left: -10px;
    padding: 0 5px;
    border: 0;
    line-height: 1;
}

.direction {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 7px;
    background: var(--green);
    color: white;
    font-size: 13px;
    font-weight: 750;
}

.direction2 {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 7px;
    background: var(--lightred);
    color: white;
    font-size: 13px;
    font-weight: 750;
}

/* 时长文字：透明背景 */
.duration {
    color: #59635e;
    font-size: 14px;
    font-weight: 700;
    background: transparent;
}

/* 价格文字：透明背景 */
.total-price {
    color: var(--red);
    font-size: 14px;
    font-weight: 800;
    background: transparent;
    font-variant-numeric: tabular-nums;
}

.leg {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    padding: 1px 0;
    margin-left: -28px;
}

.leg+.leg {
    border-top: 1px solid #edf1ee;
}

.leg-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    background: #a5ada8;
    color: white;
    font-size: 11px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

/* 起点 | 中间路线信息 | 终点 */
.route-flow {
    display: grid;
    grid-template-columns: minmax(60px, 140px) minmax(180px, 220px) minmax(60px, 140px);
    align-items: center;
    gap: 1px;
    min-width: 0;
    margin-left: -1px;
}

.route-point {
    min-width: 0;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.route-point.start {
    text-align: center;
}

.route-point.end {
    text-align: center;
}

.route-track {
    display: grid;
    grid-template-rows: auto 1px auto;
    align-items: center;
    justify-items: center;
    text-align: center;
    min-width: 0;
    line-height: 1.35;
}

.track-note {
    grid-row: 1;
    color: var(--muted);
    font-size: 11px;
    font-weight: bolder;
    text-align: center;
    white-space: nowrap;
    margin-left: 0;
}

.route-line {
    grid-row: 2;
    position: relative;
    height: 1px;
    width: 100%;
    min-width: 180px;
    max-width: 200px;
    margin-left: 0;
    background: #bdcfc1;
    justify-self: center;
}

.route-line::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    border-top: 1px solid #91aa98;
    border-right: 1px solid #91aa98;
    transform: translateY(-50%) rotate(45deg);
}

.track-fare {
    grid-row: 3;
    padding-top: 3px;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    margin-left: 0;
    text-align: center;
}

.footnote {
    margin: 7px 2px 0;
    color: #818b85;
    font-size: 11px;
    text-align: right;
}

.intro {
    margin-bottom: 52px;
}

.tips {
    margin-bottom: 10px;
    color: black;
    font-size: 22px;
}

.notice {
    margin: 0;
    color: black;
    font-size: 12px;
}