.return-shell { max-width: 1060px; margin: 36px auto 56px; padding: 0 32px; }
.tracking-intro h1 { margin: 10px 0 8px; font-size: 30px; font-weight: 600; letter-spacing: -.7px; }
.tracking-intro > p { margin: 0 0 28px; color: var(--muted); line-height: 1.8; }
.tracking-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 28px; min-width: 0; }
.tracking-heading { display: block; }
.tracking-heading h2 { font-size: 22px; line-height: 1.4; letter-spacing: -.4px; }
.tracking-heading p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 6px 0 0; max-width: 700px; }
.tracking-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; margin: 30px 0 24px; padding: 0; }
.tracking-steps li { position: relative; padding: 0 12px 0 0; min-width: 0; color: #717b89; }
.tracking-steps li:not(:last-child)::after { content: ""; position: absolute; height: 2px; background: var(--line); top: 15px; left: 39px; right: 8px; }
.step-dot { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #d5dce5; border-radius: 50%; font-size: 12px; margin-bottom: 13px; background: #fff; }
.tracking-steps b { display: block; font-weight: 500; font-size: 12px; line-height: 1.6; }
.tracking-steps small { display: block; font-size: 11px; line-height: 1.7; margin-top: 3px; }
.tracking-steps .complete { color: #32557b; }
.tracking-steps .complete .step-dot { background: #eaf0f7; border-color: #eaf0f7; }
.tracking-steps .complete::after { background: #b7cbdf !important; }
.tracking-steps [aria-current="step"] { color: var(--ink); }
.tracking-steps [aria-current="step"] .step-dot { background: #182b45; border-color: #182b45; color: #fff; }
.tracking-controls { border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tracking-controls > span { color: var(--muted); font-size: 11px; line-height: 1.7; }
.tracking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 24px; margin-top: 24px; }
.tracking-card > h2 { font-size: 15px; }
#order-downloads { margin-top: 24px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.8; }
.tracking-history { list-style: none; padding: 0; margin: 22px 0 0; }
.tracking-history li { position: relative; padding: 0 0 24px 23px; border-left: 1px solid var(--line); margin-left: 4px; overflow-wrap: anywhere; }
.tracking-history li::before { content: ""; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #a9b5c4; box-shadow: 0 0 0 4px #fff; }
.tracking-history li:first-child::before { background: #32557b; }
.tracking-history li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tracking-history b { font-size: 13px; font-weight: 500; }
.tracking-history p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 5px 0; }
.tracking-history time { display: block; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 5px; }
.tracking-details { margin: 20px 0 0; }
.tracking-details > div + div { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.tracking-details dt { color: var(--muted); font-size: 11px; }
.tracking-details dd { margin: 5px 0 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.courier-link { display: block; text-align: center; text-decoration: none; margin-top: 20px; }
.sandbox-controls { padding: 20px; margin-bottom: 28px; border: 1px solid #e8cfaa; border-radius: 10px; background: #fff9ef; }
.sandbox-controls strong { font-size: 14px; }
.sandbox-controls p { margin: 6px 0 0; color: #795b30; font-size: 12px; line-height: 1.8; }
.sandbox-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin: 16px 0 12px; }
.sandbox-actions label { display: grid; gap: 6px; font-size: 11px; color: var(--muted); }
.sandbox-actions select { max-width: 100%; min-height: 36px; border: 1px solid #d5dce5; border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 12px; background: #fff; color: var(--ink); }
.sandbox-actions button:disabled { cursor: default; }
@media (max-width: 780px) {
  .return-shell { padding: 0 20px; margin-top: 28px; }
  .tracking-intro h1 { font-size: 28px; }
  .tracking-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
  .tracking-card { padding: 22px; }
  #order-downloads { margin-top: 18px; }
  .tracking-heading h2 { font-size: 20px; }
  .tracking-steps { grid-template-columns: 1fr; gap: 0; margin-top: 24px; }
  .tracking-steps li { display: flex; gap: 14px; min-height: 76px; padding-bottom: 18px; }
  .tracking-steps li:last-child { min-height: 0; padding-bottom: 0; }
  .tracking-steps li:not(:last-child)::after { height: auto; width: 2px; top: 39px; bottom: 7px; left: 15px; right: auto; }
  .step-dot { flex-shrink: 0; margin: 0; }
  .tracking-steps b { font-size: 13px; }
  .tracking-steps small { font-size: 12px; }
  .tracking-controls { align-items: flex-start; }
}
@media (max-width: 360px) { .return-shell { padding: 0 14px; } .tracking-card { padding: 18px; } }
.customer-account { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; margin: -12px 0 24px; color: var(--muted); font-size: 11px; }
.customer-account span { overflow-wrap: anywhere; }
.customer-account b { font-weight: 500; color: var(--ink); }
.customer-account button { border: 0; border-left: 1px solid var(--line); padding: 0 0 0 12px; background: none; color: var(--muted); font-size: 11px; }
/* The map is a delivery surface, with the package as the primary landmark. */
.map-card { grid-column: 1 / -1; padding: 26px; overflow: hidden; }
.order-card { grid-column: 2; }
.package-map-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.package-map-heading h2 { font-size: 21px; letter-spacing: -.5px; margin-top: 5px; }
.map-eyebrow { color: #6b7788; font-size: 9px; font-weight: 600; letter-spacing: 1.4px; }
.package-update { margin: 20px 0 5px; font-size: 14px; line-height: 1.7; font-weight: 500; overflow-wrap: anywhere; }
.package-location-time { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 0 0 20px; overflow-wrap: anywhere; }
.package-map-frame { position: relative; border: 1px solid #e2e8ee; border-radius: 14px; overflow: hidden; isolation: isolate; }
#delivery-map { height: 460px; margin: 0; background: #f1f4f6; font-family: inherit; }
.map-location-badge { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; background: #f1f5f9; border-radius: 20px; padding: 8px 12px; font-size: 10px; color: #445872; }
.map-location-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #587895; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #f1f4f6; color: var(--muted); font-size: 12px; }
.map-tools { position: absolute; right: 14px; bottom: 42px; display: grid; gap: 12px; }
.map-tools button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: #fff; color: #182b45; font: inherit; font-size: 24px; cursor: pointer; }
.map-tools > button, .map-zoom { border: 1px solid #d8e0e7; border-radius: 10px; box-shadow: 0 3px 12px #182b4514; overflow: hidden; }
.map-zoom button + button { border-top: 1px solid #e8edf2; }
.map-tools button:hover { background: #f2f6fa; }
.map-tools button:focus-visible { outline: 3px solid #32557b; outline-offset: -3px; }
.shipment-pin { position: relative; display: grid; place-items: center; font-family: inherit; }
.shipment-pin-symbol { display: grid; place-items: center; background: #fff; box-shadow: 0 4px 18px #182b4530; }
.shipment-pin-truck .shipment-pin-symbol { width: 64px; height: 46px; background: none; box-shadow: none; filter: drop-shadow(0 3px 5px #182b452e); }
.shipment-pin-destination .shipment-pin-symbol { width: 40px; height: 50px; background: none; box-shadow: none; filter: drop-shadow(0 3px 4px #182b452e); }
.shipment-pin-pickup .shipment-pin-symbol { width: 14px; height: 14px; border: 4px solid #fff; border-radius: 50%; background: #64758a; }
.shipment-pin-label { position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 7px; background: #fff; box-shadow: 0 2px 8px #182b451c; color: #182b45; white-space: nowrap; font-size: 11px; font-weight: 600; }
.shipment-pin-truck .shipment-pin-label { color: #b93621; }
.map-route-summary { display: flex; align-items: flex-start; gap: 10px; margin-top: 17px; color: var(--muted); }
.map-route-summary p { margin: 0; font-size: 11px; line-height: 1.7; }
.route-line-key { width: 22px; height: 4px; margin-top: 7px; flex-shrink: 0; border-radius: 2px; background: #b3c0cf; }
.route-drawn .route-line-key { background: #ee563d; }
.location-empty { padding: 16px; background: #f8f9fb; border-radius: 8px; color: var(--muted); line-height: 1.8; font-size: 12px; }
.package-map-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 20px; }
.package-map-actions > button { border: 1px solid #d9e1eb; border-radius: 8px; padding: 9px 13px; background: #fff; color: #182b45; font-size: 11px; font-weight: 500; }
.package-map-actions > button:hover { background: #f4f7fb; }
.package-map-actions > a:not(.courier-link) { color: #5e6d80; font-size: 11px; text-decoration: none; }
.package-map-actions > a:hover { text-decoration: underline; }
.package-map-actions .courier-link { margin: 0 0 0 auto; padding: 9px 12px; color: #182b45; background: #edf2f8; border-radius: 8px; text-decoration: none; font-size: 11px; font-weight: 600; }
@media (max-width: 780px) {
  .map-card, .order-card { grid-column: 1; grid-row: auto; }
  .map-card { padding: 20px; }
  #delivery-map { height: 400px; }
  .package-map-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .package-map-heading h2 { font-size: 20px; }
  .map-location-badge { font-size: 10px; padding: 6px 10px; }
  .package-map-actions .courier-link { margin-left: 0; }
  .tracking-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 26px 0 20px; }
  .tracking-steps li { display: block; min-height: 0; padding: 0; }
  .tracking-steps li:not(:last-child)::after { width: auto; height: 2px; top: 12px; bottom: auto; left: 33px; right: 0; }
  .tracking-steps .step-dot { width: 26px; height: 26px; font-size: 10px; margin-bottom: 10px; }
  .tracking-steps b { font-size: 10px; line-height: 1.5; }
  .tracking-steps small { display: none; }
}

#delivery-map .maplibregl-ctrl-attrib { font-family: inherit; font-size: 9px; color: #596879; }
#delivery-map .maplibregl-ctrl-attrib a { color: #536377; }
#delivery-map .maplibregl-canvas:focus-visible { outline: 2px solid #32557b; outline-offset: -2px; }
.map-route-summary { flex-wrap: wrap; }
.map-route-summary p { flex: 1; min-width: 150px; }
.route-credit { margin-left: auto; font-size: 10px; line-height: 1.8; }
.route-credit a { color: #64758a; text-decoration: none; }
.route-credit a:hover { text-decoration: underline; }
@media (max-width: 780px) { .route-credit { width: 100%; margin-left: 32px; } }

 .sandbox-destination { margin: 0 0 20px; padding: 14px; border: 1px solid #e2e8ee; border-radius: 9px; background: #f8fafc; }
.sandbox-destination label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.sandbox-destination select { max-width: 100%; padding: 9px; border: 1px solid #cdd8e5; border-radius: 6px; color: #182b45; background: #fff; font: inherit; font-size: 12px; }
.sandbox-destination p { margin: 8px 0; font-size: 11px; line-height: 1.7; color: #65758a; overflow-wrap: anywhere; }
.sandbox-destination > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.sandbox-destination button, .sandbox-destination a { font-size: 11px; color: #182b45; }
.sandbox-destination button { padding: 7px 10px; background: #fff; border: 1px solid #cdd8e5; border-radius: 6px; cursor: pointer; }
@media (max-width: 780px) { .map-tools { bottom: 66px; } .sandbox-destination select { width: 100%; font-size: 16px; } }

.customer-profile-photo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
