#today { scroll-margin-top: 120px; }
#today .tp-btn { white-space: nowrap; }
.tp-date-nav { display: inline-flex; gap: 4px; margin-left: .2rem; }
.tp-date-step { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-muted); font: 500 16px/1 var(--font); text-decoration: none; }
.tp-date-step:hover:not(:disabled), .tp-date-step:focus-visible { border-color: var(--accent); color: var(--accent); background: #eef3f0; }
.tp-date-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tp-date-step:disabled { opacity: .35; cursor: not-allowed; }
.tp-date-pick { height: 28px; padding: 0 .3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 13px/1 var(--font); }
.tp-date-pick:hover, .tp-date-pick:focus { border-color: var(--accent); outline: none; }
.tp-synced { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink); }
.tp-track { display: inline-block; margin: .35rem 0 0 .75rem; font-size: 12px; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; }
.tp-track:hover { color: var(--accent); }
@media (max-width: 768px) {
    #today .tp-btn { min-width: 0; padding-inline: .45rem; gap: .25rem; font-size: 12px; }
}
.tp-sync-notice { flex-basis: 100%; color: var(--danger); font-size: 12px; }
.tp-sync-notice:empty { display: none; }
.tp-tasks { --tp-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tp-check-notice { margin: 0 0 .75rem 50%; padding-left: 1rem; font-size: 12px; }
.tp-check-notice .tp-ck-redo { margin-top: .3rem; }
.tp-check-notice .tp-ck-redo:disabled { opacity: .5; cursor: wait; }
.tp-check-notice .tp-ck-state { align-items: baseline; }
.tp-check-notice i { flex-shrink: 0; }
.tp-task-block { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tp-task-block + .tp-task-block { margin-top: 1.25rem; }
.tp-task-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem; padding: .7rem 1rem; background: #f4f2ec; }
.tp-task-heading h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.tp-task-heading > span { color: var(--ink-muted); font-size: 12px; }
.tp-task-block[data-priority="must"] .tp-task-heading { background: #eef3f0; }
.tp-task-block[data-priority="must"] .tp-task-heading h3 { color: var(--accent); }
.tp-task-columns, .tp-task-row { display: grid; grid-template-columns: var(--tp-columns); }
.tp-task-columns { border-block: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.tp-task-columns > span { padding: .4rem 1rem; }
.tp-task-columns > span + span { border-left: 1px solid var(--line); }
.tp-task-list { list-style: none; margin: 0; padding: 0; }
.tp-task-list > li + li { border-top: 1px solid var(--line); }
.tp-task-plan, .tp-task-result { min-width: 0; padding: .8rem 1rem; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.tp-task-plan h4 { display: inline; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.tp-task-plan p { margin: .25rem 0 0; white-space: pre-line; }
.tp-task-category { font-size: 11px; color: var(--ink-muted); margin-right: .65rem; }
.tp-task-result { border-left: 1px solid var(--line); background: #fdfcf9; }
.tp-task-result .ck-slot { margin-top: 0; }
.tp-task-result .ck { font-size: 12px; }
.tp-no-record { display: none; color: var(--ink-muted); font-size: 12px; }
.tp-task-result > .ck-slot:empty + .tp-no-record { display: inline; }
.tp-task-empty { padding: 1rem; color: var(--ink-muted); font-size: 13px; }
.tp-task-piece + .tp-task-piece { margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--line); }
.tp-task-merged .tp-task-result > .ck-slot + .ck-slot { margin-top: .55rem; padding-top: .55rem; border-top: 1px dashed var(--line); }
.tp-task-result .tp-vitals { margin-top: .55rem; }
.tp-purpose { margin: 0 0 .9rem; padding: .7rem .9rem; background: #f7f5ef; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; line-height: 1.65; color: var(--ink); }
.tp-purpose p { margin: 0; }
.tp-purpose p + p { margin-top: .3rem; }
.tp-purpose b { margin-right: .4rem; font-weight: 600; color: var(--accent); }
.tp-volunteer { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .9rem; padding: .7rem .9rem; background: #eef3f0; border: 1px solid var(--accent); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.55; }
.tp-volunteer b { flex-shrink: 0; color: var(--accent); font-weight: 600; }
.tp-volunteer:hover { background: #e4eee8; }
.tp-stage { display: grid; grid-template-columns: minmax(0, 1fr) 252px; column-gap: 1rem; row-gap: 0; align-items: start; }
.tp-check-notice { grid-column: 1; }
.tp-tasks { grid-column: 1; }
.tp-load { grid-column: 2; grid-row: 2; align-self: start; position: sticky; top: 120px; border: 1px solid var(--line); border-radius: var(--radius); background: #fdfcfa; padding: .65rem .7rem .55rem; }
.tp-load-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.tp-load-legend { margin: .15rem 0 .45rem; font-size: 11px; color: var(--ink-muted); }
.tp-load-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 3px; border-radius: 1px; vertical-align: 0; }
.tp-load-legend i.time { background: var(--accent); }
.tp-load-legend i.time.plan { background: #c9ddd2; margin-left: .15rem; }
.tp-load-legend i.gain { background: var(--warn); }
.tp-load-legend i.gain.plan { background: #e4d3b0; margin-left: .45rem; }
.tp-load ol { list-style: none; margin: 0; padding: 0; }
.tp-load li + li { margin-top: .3rem; }
.tp-load-day { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "when kind" "km km" "gain gain"; gap: .12rem .4rem; padding: .35rem .4rem; border: 1px solid transparent; border-radius: var(--radius); color: inherit; text-decoration: none; }
.tp-load-day:hover { border-color: var(--line); background: #fff; text-decoration: none; color: inherit; }
.tp-load-day.is-on { border-color: var(--accent); background: #eef3f0; }
.tp-load-when { grid-area: when; font-size: 12px; color: var(--ink-muted); }
.tp-load-when b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-load-today { display: inline-block; margin-left: .3rem; padding: 0 4px; font-size: 10px; line-height: 1.45; font-weight: 600; color: #fff; background: var(--ink); border-radius: 2px; vertical-align: 1px; }
.tp-load-kind { grid-area: kind; font-size: 11px; color: var(--accent); text-align: right; }
.tp-load-day.is-on .tp-load-kind { font-weight: 600; }
.tp-load-meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .35rem; min-width: 0; }
.tp-load-meter.gain { grid-area: gain; }
.tp-load-meter:not(.gain) { grid-area: km; }
.tp-load-meter > span { position: relative; display: block; height: 5px; border-radius: 1px; background: #efece5; overflow: hidden; }
.tp-load-meter > span > i { position: absolute; left: 0; top: 0; height: 100%; display: block; }
.tp-load-meter > span > i.plan { background: #c9ddd2; }
.tp-load-meter > span > i.actual { background: var(--accent); }
.tp-load-meter.gain > span > i.plan { background: #e4d3b0; }
.tp-load-meter.gain > span > i.actual { background: var(--warn); }
.tp-load-meter em { font-style: normal; font-size: 10.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-task-result .ck-slot:empty + .tp-vitals { margin-top: 0; }
.tp-task-result .tp-vgrid { grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); }
.tp-task-overview { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tp-task-overview .tp-count { font-size: 13px; }
.tp-task-overview .ck-slot[data-ck-key="_extra"]:not(:empty)::before { content: "计划外："; display: block; font-weight: 600; margin: .45rem 0 .25rem; }
.tp-task-overview .tp-ck-redo { display: inline-block; margin-top: .4rem; }
body:not(.coach-on) .tp-task-overview .tp-ck-redo { display: none; }
@media (max-width: 768px) {
    .tp-task-heading, .tp-task-columns > span { padding-left: .6rem; padding-right: .6rem; }
    .tp-task-plan, .tp-task-result { padding: .65rem .6rem; font-size: 12px; }
    .tp-task-plan h4 { display: block; font-size: 12px; }
    .tp-task-category { display: block; margin: 0 0 .15rem; }
    .tp-task-columns { font-size: 11px; }
    .tp-task-result .ck { padding: .25rem .35rem; }
    .tp-task-result .tp-vgrid { grid-template-columns: 1fr; }
    .tp-task-result .tp-v dd { font-size: 17px; }
    .tp-task-result .tp-v dd small { display: inline-block; }
    .tp-task-result .ck-q { padding-left: 0; }
    .tp-task-result .ck-q::before { display: none; }
    .tp-stage { grid-template-columns: 1fr; }
    .tp-check-notice, .tp-tasks, .tp-load { grid-column: 1; grid-row: auto; }
    .tp-load { position: static; order: -1; }
    .tp-load ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .3rem; }
    .tp-load li + li { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .tp-tasks .ck, .tp-tasks .tp-ck-state i { animation: none; }
}
