.route-review-time-fields {
 display:grid;
 grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
 gap:var(--ui-space-3);
 align-items:end;
}
.route-review-time-fields>label,.route-review-time-fields .ui-date-control label {
 display:grid;
 gap:var(--ui-space-1);
 margin:0;
 font-size:var(--ui-text-body);
}
.route-review-time-fields .ui-date-control { margin:0; }
.route-review-time-fields .ui-date-control label { margin-block-end:var(--ui-space-1); }
.route-ticket-fit {
 display:grid;
 gap:var(--ui-space-2);
 margin:0;
 padding:var(--ui-space-3);
 border-radius:var(--ui-radius-control);
 background:var(--ui-surface-soft);
}
.route-ticket-fit.route-issue { background:var(--ui-warning-surface); }
.route-ticket-fit-context {
 display:flex;
 flex-wrap:wrap;
 gap:0 var(--ui-space-2);
 color:var(--ui-text-muted);
 font-size:var(--ui-text-caption);
}
.route-ticket-fit-context>span+span { font-variant-numeric:tabular-nums; }
.route-ticket-fit-answers {
 display:grid;
 background:var(--ui-surface-panel);
 border-radius:var(--ui-radius-control);
 overflow:hidden;
}
.route-ticket-fit-answers[hidden] { display:none; }
.route-ticket-fit-answers>label {
 position:relative;
 display:grid;
 grid-template-columns:16px minmax(0,1fr);
 align-items:center;
 gap:var(--ui-space-2);
 min-height:44px;
 margin:0;
 padding:var(--ui-space-2) var(--ui-space-3);
 color:var(--ui-text);
}
.route-ticket-fit-answers>label:has(:checked) { background:var(--ui-surface-selected); }
.route-ticket-fit-answers>label:has(+label)::after {
 position:absolute;
 inset:auto var(--ui-space-3) 0 calc(var(--ui-space-3) + 16px + var(--ui-space-2));
 height:1px;
 background:var(--ui-border-panel);
 content:'';
}
.route-ticket-fit-answers input {
 width:16px;
 height:16px;
 margin:0;
 accent-color:var(--ui-accent);
}
@media(hover:hover) and (pointer:fine) {
 .route-ticket-fit-answers>label:hover { background-image:linear-gradient(var(--ui-hover-layer),var(--ui-hover-layer)); cursor:pointer; }
}
.route-ticket-fit-actions { margin:0; }
.route-ticket-fit-hint:empty { display:none; }
.route-ticket-use-list {
 display:grid;
 padding:0;
 margin:0;
 list-style:none;
 border-radius:var(--ui-radius-control);
 background:var(--ui-surface-soft);
}
.route-ticket-use-list>li {
 position:relative;
 display:grid;
 grid-template-columns:18px minmax(0,1fr);
 gap:var(--ui-space-2);
 align-items:start;
 padding:var(--ui-space-3);
}
.route-ticket-use-list>li:has(+li)::after {
 content:'';
 position:absolute;
 inset:auto var(--ui-space-3) 0 calc(var(--ui-space-3) + 18px + var(--ui-space-2));
 height:1px;
 background:var(--ui-border-panel);
}
.route-ticket-use-icon { display:flex; color:var(--ui-text-muted); margin-block-start:2px; }
.route-ticket-use-icon svg { width:18px; height:18px; }
.route-ticket-use-icon[data-tone=success] { color:var(--ui-success); }
.route-ticket-use-icon[data-tone=warning] { color:var(--ui-warning); }
.route-ticket-use-list strong,.route-ticket-use-list small { display:block; overflow-wrap:anywhere; }
.route-ticket-use-list strong { font-weight:600; }
.route-ticket-use-list small { font-size:var(--ui-text-caption); color:var(--ui-text-muted); }

.route-card:has(>.route-drop-handle),.route-drop-combine-target { position:relative; }
.route-card:has(>.route-drop-handle)>.route-card-open { padding-inline-end:calc(var(--ui-control) + var(--ui-space-3)); }
.route-drop-handle {
 position:absolute;
 z-index:1;
 inset-block-start:var(--ui-space-2);
 inset-inline-end:var(--ui-space-2);
 min-height:var(--ui-control);
 padding:var(--ui-space-2);
 cursor:grab;
 user-select:none;
}
.route-card.is-drag-source { opacity:.42; }
.route-card[data-drag-item]>.route-card-open { user-select:none; }
.route-drop-handle[aria-pressed=true] {
 --ui-action-fill:var(--ui-surface-selected);
 color:var(--ui-accent);
}
.route-drop-mode:not([hidden]) {
 position:sticky;
 inset-block-start:var(--route-drop-mode-top,var(--ui-space-2));
 z-index:4;
 display:flex;
 justify-content:space-between;
 align-items:center;
 gap:var(--ui-space-2);
 margin-block-end:var(--ui-space-3);
 padding:var(--ui-space-1) var(--ui-space-2) var(--ui-space-1) var(--ui-space-3);
}
.route-drop-mode>span { min-inline-size:0; overflow-wrap:anywhere; }
.route-drop-mode .route-caption { margin:0; }
.route-drop-mode>.route-button { flex:none; }
.route-drop-ghost.planning-drag-preview {
 position:fixed;
 z-index:1001;
 inset:0 auto auto 0;
 display:flex;
 align-items:center;
 gap:var(--ui-space-2);
 max-inline-size:min(200px,52vw);
 padding:var(--ui-space-1) var(--ui-space-3) var(--ui-space-1) var(--ui-space-1);
 border:1px solid var(--ui-border-panel);
 border-radius:var(--ui-radius-control);
 background:var(--ui-depth-panel);
 color:var(--ui-text);
 font-size:var(--ui-text-body);
 font-weight:600;
 white-space:nowrap;
 opacity:.76;
 pointer-events:none;
 box-shadow:var(--ui-shadow-panel);
 will-change:translate;
 transition:scale 120ms ease,opacity 120ms ease;
}
.route-drop-ghost>.route-type-icon { inline-size:28px; block-size:28px; border-radius:var(--ui-radius-control); }
.route-drop-ghost>.route-type-icon svg { inline-size:16px; block-size:16px; }
.route-drop-ghost>span:last-child { overflow:hidden; text-overflow:ellipsis; }
.route-drop-ghost.over-calendar { scale:.8; opacity:.42; }
.route-drop-ghost.over-insertion-time { opacity:.08; transition-property:scale; }
@supports (mask-composite:exclude) {
 .route-drop-ghost.over-insertion-time {
  opacity:.48;
  mask-image:linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor);
  mask-size:100% 100%,var(--drop-cutout-size);
  mask-position:0 0,var(--drop-cutout-position);
  mask-repeat:no-repeat;
  mask-composite:exclude;
 }
}
.route-month [data-drop-day].is-drop-target:not([aria-pressed=true]) {
 outline:2px solid var(--ui-accent);
 outline-offset:-2px;
 --ui-action-fill:var(--ui-surface-selected);
}
.route-drop-lane { gap:0; }
.route-drop-lane>.route-date { margin-block-end:var(--ui-space-1); }
.route-drop-lane>:is(.route-card,.route-decision)+:is(.route-card,.route-decision) {
 margin-block-start:var(--ui-space-3);
}
.route-drop-gap { position:relative; min-block-size:var(--ui-space-3); }
.route-drop-gap[data-active-drop] { min-block-size:44px; }
.route-drop-picking .route-drop-gap:has(>.route-drop-place:not([hidden])) {
 padding-block:var(--ui-space-2);
}
.planning-dragging .route-drop-gap::before {
 content:'';
 position:absolute;
 inset:0;
 z-index:2;
}
.planning-dragging .route-drop-gap[data-drop-previous]::before { inset-block-start:-6px; }
.planning-dragging .route-drop-gap[data-drop-next]::before { inset-block-end:-6px; }
.route-drop-place:not([hidden]) { display:block; min-height:44px; padding:0; text-align:start; }
.planning-dragging .route-drop-place {
 position:absolute;
 inset:0;
 inline-size:100%;
 pointer-events:none;
}
.route-drop-empty {
 display:grid;
 align-items:center;
 min-block-size:calc(var(--ui-control) + 2 * var(--ui-space-5));
 padding:0;
 --route-drop-ink:var(--ui-accent);
 --route-drop-fill:var(--ui-surface-panel);
 transition:background-color var(--ui-duration-feedback) var(--ui-ease),border-color var(--ui-duration-feedback) var(--ui-ease);
}
.route-drop-empty>p,.route-drop-empty>.route-drop-place:not([hidden]) {
 grid-area:1/1;
 min-inline-size:0;
 padding:var(--ui-space-3);
}
.route-drop-empty>p { transition:opacity var(--ui-duration-feedback) var(--ui-ease); }
.route-drop-empty>p[aria-hidden=true] { opacity:0; }
.route-drop-empty:has(>.route-drop-place:not([hidden])) {
 background:var(--ui-surface-selected);
 border-color:var(--ui-accent);
}
.route-drop-empty>.route-drop-place:not([hidden]) {
 align-self:stretch;
 display:flex;
 flex-wrap:wrap;
 align-items:center;
 justify-content:space-between;
 gap:var(--ui-space-2);
 animation:route-drop-empty-in var(--ui-duration-feedback) var(--ui-ease) both;
}
.planning-dragging .route-drop-empty>.route-drop-place {
 position:relative;
 inset:auto;
}
@keyframes route-drop-empty-in { from { opacity:0; } }
.route-drop-marker {
 display:grid;
 align-content:center;
 gap:var(--ui-space-1);
 min-height:44px;
 padding:var(--ui-space-1) var(--ui-space-3);
 --route-drop-ink:var(--ui-accent);
 --route-drop-fill:var(--ui-surface-selected);
 font-variant-numeric:tabular-nums;
}
.route-drop-summary { display:flex; align-items:center; gap:var(--ui-space-2); min-inline-size:0; }
.route-drop-title { flex:1; min-inline-size:0; overflow-wrap:anywhere; }
.route-drop-time {
 display:inline-flex;
 align-items:center;
 gap:var(--ui-space-1);
 padding:var(--ui-space-1) var(--ui-space-2);
 border-radius:var(--ui-radius-pill);
 color:var(--route-drop-ink);
 background:var(--route-drop-fill);
 font-size:var(--ui-text-body);
 line-height:1.4;
}
.route-drop-time strong { font-weight:600; overflow-wrap:anywhere; }
.route-drop-time svg { inline-size:16px; block-size:16px; flex:none; }
.route-drop-marker[data-status=short] { --route-drop-ink:var(--ui-warning); --route-drop-fill:var(--ui-warning-surface); }
.route-drop-marker[data-status=blocked] { --route-drop-ink:var(--ui-danger); --route-drop-fill:var(--ui-danger-surface); }
[data-active-drop] .route-drop-line {
 flex:1 0 8px;
 block-size:2px;
 border-radius:var(--ui-radius-pill);
 background:var(--route-drop-ink);
}
[data-active-drop] .route-drop-marker[data-layout=card] {
 background:var(--ui-surface-selected);
 border-radius:var(--ui-radius-control);
}
.route-drop-marker>.route-caption { margin:0; }
.route-drop-combine-cue {
 position:absolute;
 inset:auto 0 0;
 pointer-events:none;
 display:none;
 align-items:center;
 gap:var(--ui-space-2);
 padding:var(--ui-space-2) var(--ui-space-3);
 font-size:var(--ui-text-body);
 font-weight:600;
}
.route-drop-combine-target[data-armed=true] { border-color:var(--ui-route-choice-header-ink); }
.route-drop-combine-target[data-armed=true] .route-drop-combine-cue {
 display:flex;
 color:var(--ui-route-choice-header-ink);
 background:linear-gradient(var(--ui-depth-direction),var(--ui-route-choice-header-start),var(--ui-route-choice-header-end));
}
.route-drop-combine-target[data-armed=blocked] .route-drop-combine-cue {
 display:flex;
 background:var(--ui-danger-surface);
 color:var(--ui-danger);
}
.route-drop-combine-cue svg { width:18px; height:18px; flex:none; }
.route-drop-card-title {
 display:flex;
 align-items:baseline;
 flex-wrap:wrap;
 gap:var(--ui-space-1) var(--ui-space-2);
}
.route-drop-card-action {
 display:inline-flex;
 align-items:center;
 gap:var(--ui-space-1);
 color:var(--ui-accent);
 font-weight:600;
}
.route-drop-card-action[data-blocked] { color:var(--ui-danger); }
.route-drop-card-action svg { width:14px; height:14px; flex:none; }
.route-short-window { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:var(--ui-space-1) var(--ui-space-2); align-items:center; }
.route-short-window>:is(label,.route-caption) { grid-column:1/-1; }
.route-short-window>label { margin:0; font-size:var(--ui-text-body); }
.route-short-window>.ui-field {
 inline-size:calc(3ch + 2 * var(--ui-space-3) + var(--ui-space-5));
 font-variant-numeric:tabular-nums;
}
.route-short-window>.route-button { justify-self:start; min-height:var(--ui-control); color:var(--ui-accent); }
@media(prefers-reduced-motion:reduce) {
 .route-drop-ghost.planning-drag-preview { transition:none; }
}

.planning-dragging .route-canvas .route-agenda { overflow-anchor:none; }
.route-canvas .route-drop-place:not([hidden]) {
 border:1px solid transparent; border-radius:var(--ui-radius-control); color:var(--ui-text); background:transparent;
}
