.shift-hero {
  background-image: url("./assets/morning-shopping-street.webp"), url("./assets/delivery-town.png");
  background-position: center 54%;
}
.shift-intro .shift-route-actions { margin-top: 22px; }
.shift-intro .shift-intro-goal { margin-top: 10px; color: #fff0cc; }
.shift-legacy-bar { margin-bottom: 10px; }

.shift-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.shift-main, .shift-dispatch { display: grid; min-width: 0; gap: 10px; align-content: start; }
.shift-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.shift-panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1px 10px;
  margin-bottom: 6px;
}
.shift-panel-heading h2, .shift-panel h3 { font-size: 16px; }
.shift-panel-heading > :not(h2):not(h3) { color: var(--muted); font-size: 13px; }
.shift-time { color: var(--highlight); font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.shift-route-actions, .shift-road-options { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.shift-route-actions button, .shift-road-options button { padding-inline: 10px; font-size: 14px; }
.shift-road-options button { flex: 1 1 max-content; }
.shift-road-options small { color: var(--muted); font-variant-numeric: tabular-nums; }
.shift-preview {
  margin-block: 7px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #112820;
  color: var(--muted);
  font-size: 14px;
}
.shift-preview ul, .shift-preview ol { margin: 0; padding-inline-start: 1.3em; }
.shift-preview strong { color: var(--ink); }
.shift-preview dl { margin-block: 0; }
.shift-preview dd { margin-inline-start: 0; }
.shift-alert, .shift-mission {
  padding: 9px 12px;
  border: 1px solid #806133;
  border-radius: 10px;
  background: #392e1d;
  color: #ffe0ac;
  font-size: 14px;
}
.shift-mission {
  border-color: #4b694a;
  background: #243e30;
  color: #e8efc9;
}
.shift-alert [data-acknowledge] { margin-top: 7px; }
.shift-job-list { display: grid; gap: 7px; margin-top: 6px; }
.shift-job {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #142c24;
  font-size: 14px;
}
.shift-job strong { display: block; font-size: 15px; }
.shift-job small { display: block; color: var(--muted); font-size: 13px; }
.shift-job button { min-width: 44px; padding: 5px 9px; font-size: 14px; }
.shift-job .shift-route-actions { justify-content: flex-end; }
.shift-job .shift-route-actions button { font-size: 13px; }
.shift-job.is-done { border-color: #546a43; }
.shift-job.is-late { border-color: #8a5a45; }
.shift-result { max-width: 738px; margin-inline: auto; }
.shift-result > .shift-panel { margin-top: 10px; }
.shift-result .ld-result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shift-result-outcome { color: var(--highlight); font-weight: 750; }
.shift-result-recap { max-width: 38ch; margin: 6px auto 0; color: var(--ink); font-size: 14px; }
.shift-result-details summary { cursor: pointer; font-weight: 700; }
.shift-detail-method { margin-inline-start: .4em; color: var(--amber); white-space: nowrap; }
.shift-achievements { display: grid; gap: 8px; }
.shift-achievements article {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #152e26;
}
.shift-achievements article button { margin-top: 8px; }
.shift-achievements h3 { font-size: 16px; }
.shift-achievements p { color: var(--muted); font-size: 14px; }
.shift-progress { margin-block: 8px 12px; }
.shift-progress progress { accent-color: var(--highlight); width: 100%; height: 9px; vertical-align: middle; }
.shift-progress p, .shift-job p, .shift-result-notes, .shift-trip-notice { color: var(--muted); font-size: 13px; }
.shift-place { font-size: clamp(18px, 3vw, 26px) !important; }
.shift-play h1 small { color: var(--muted); font-size: .54em; }
.shift-route-sequence { margin-block: 7px; color: var(--muted); font-size: 14px; }
.shift-next-road { margin-block: 7px; color: var(--ink); font-size: 14px; }
.shift-next-road strong { margin-inline-end: 6px; color: var(--amber); }
.shift-preview p small { display: block; color: var(--muted); }
.shift-trip-notice { margin-top: 6px; }
.shift-late { color: #ffb39c !important; }
.shift-alert { margin-block: 8px; }
.shift-market-call { border-color: #a6763e; }
.shift-market-call strong { margin-inline-end: .35em; color: #ffdf9a; }
.shift-market-forecast { margin-block: 5px; }
.shift-market-contract strong { color: var(--highlight); }
.shift-workspace { margin-top: 8px; }
.shift-mission button, .shift-office .shift-panel > button, .ld-shop > button { margin-top: 9px; }
.ld-shop .ld-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shift-request-card p + p { margin-top: 5px; color: var(--muted); }
.shift-request-card button, .shift-requests > button, .shop-item [data-view="requests"] { margin-top: 9px; }
.shift-trust { display: flex; gap: 16px; margin: 0; }
.shift-trust dd { margin: 0; color: var(--highlight); font-weight: 750; }
.shift-result-notes { padding-left: 1.2em; }
.shift-job h3 small { display: inline; font-weight: 500; }
.shift-route-actions [aria-pressed="true"] { border-color: var(--highlight) !important; }

.shift-map-van {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  left: var(--x);
  top: var(--y);
  width: 21px;
  height: 11px;
  transform: translate(-50%, -36px);
  border: 1px solid #263d35;
  border-radius: 3px 5px 2px 2px;
  background: linear-gradient(90deg, #9bcdb2 62%, #e4edde 62% 88%, #9bcdb2 88%);
  box-shadow: 0 1px 4px #10251f;
}
.shift-map-van.is-cream { background: linear-gradient(90deg, #e6c481 62%, #fff1cd 62% 88%, #e6c481 88%); }
.shift-map-van::after { content: ""; position: absolute; bottom: -3px; left: 2px; width: 5px; height: 5px; background: #22302e; box-shadow: 10px 0 #22302e; border-radius: 50%; }
.shift-map-van.is-moving { animation: shift-driving var(--duration) linear calc(-1 * var(--elapsed)) both; }
@keyframes shift-driving { to { left: var(--end-x); top: var(--end-y); } }
@media (prefers-reduced-motion: reduce) { .shift-map-van.is-moving { animation: none; } }

.shift-map {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.7;
  min-height: 260px;
  border-radius: 12px;
  border: 1px solid #587363;
  background-color: #27483c;
  background-image: linear-gradient(0deg, #bad6a011 1px, transparent 1px), linear-gradient(90deg, #bad6a011 1px, transparent 1px), radial-gradient(ellipse at 15% 15%, #47694d, transparent 64%);
  background-size: 24px 24px, 24px 24px, auto;
}
.shift-map-layout { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.shift-water { fill: #355c62; stroke: #789882; stroke-width: 1; vector-effect: non-scaling-stroke; }
.shift-contour { fill: none; stroke: #83a68767; stroke-width: 1; vector-effect: non-scaling-stroke; }
.shift-street {
  stroke: #b4c3a8;
  stroke-width: 3.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.shift-street.is-works { stroke: #eca065; stroke-dasharray: 5 4; }
.shift-route-leg {
  fill: none;
  stroke: #f4cd7e;
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.shift-route-leg.is-next { stroke: #ffe095; stroke-width: 6; }
.shift-route-arrow { fill: #f4cd7e; stroke: #324438; stroke-width: .6; }
.shift-route-arrow.is-next { fill: #ffe095; stroke: #25392c; }
.shift-map .shift-road-chip {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, calc(-50% - var(--clearance, 12px)));
  padding: 1px 5px;
  border: 1px solid #688375;
  border-radius: 5px;
  background: #1c3b30f5;
  color: #ebf3d8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.shift-map .shift-road-chip.is-works { border-color: #a97746; background: #492f20; color: #ffe1b7; }
.delivery-app .shift-map-node {
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 0 5px;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  min-height: 44px;
  min-width: 54px;
  padding: 3px 6px;
  border: 1px solid #91aa89;
  border-radius: 8px;
  background: #16332af7;
  color: #f4f4dc;
  font-size: clamp(12px, 2.7vw, 14px);
  white-space: nowrap;
  box-shadow: 0 2px 8px #0d261abc;
}
.shift-map-node-dot { width: 8px; aspect-ratio: 1; border-radius: 50%; background: #aecc9a; }
.delivery-app .shift-map-node.is-selected {
  background: #ffdc81;
  border-color: #fff0cc;
  color: #302416;
}
.shift-map-node.is-selected .shift-map-node-dot { background: #6e4622; }
.delivery-app .shift-map-node.is-current { border-color: #f5d57d; }
.shift-map-node.is-current .shift-map-node-dot { background: #f5d57d; }
.shift-map-node.is-current small { grid-column: 2; color: #ffe1a2; font-size: 10px; }
.shift-map-node.is-selected small { color: #58351b; }
.delivery-app .shift-map-node:disabled { opacity: .76; }
.delivery-app .shift-map-node.is-current:disabled, .delivery-app .shift-map-node.is-selected:disabled { opacity: 1; }

.delivery-app:has(.shift-play) .app-header { display: none; }
.delivery-app:has(.shift-play) .app-stage {
  padding-top: max(10px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.delivery-app:has(.shift-play) .toast { bottom: max(12px, env(safe-area-inset-bottom)); }

@media (max-width: 740px) {
  .ld-shop .ld-shop-grid { grid-template-columns: 1fr; }
  .shift-workspace { grid-template-columns: 1fr; gap: 8px; }
  .shift-workspace.needs-cargo .shift-dispatch { display: contents; }
  .shift-workspace.needs-cargo .shift-jobs { order: -1; }
  .shift-main, .shift-dispatch { gap: 8px; }
  .shift-panel { padding: 9px; }
  .shift-map { min-height: 228px; }
}

@media (max-width: 420px) {
  .shift-hero { background-position: 58% center; }
  .shift-map { min-height: 214px; }
  .shift-route-actions button, .shift-road-options button { padding-inline: 7px; }
  .shift-job { padding: 5px 6px; }
}

.rider-card{display:flex;align-items:center;gap:16px}.rider-card>svg{flex:0 0 90px}.rider-card h2{margin:0}.rider-card p{margin:6px 0}.shift-panel select[data-service-area]{display:block;width:100%;margin-top:8px;padding:10px;border:1px solid #527158;border-radius:10px;background:#173b2c;color:#f5f3da;font:inherit}
