/* Customer order tracking page (mobile first) */
body { background: var(--wash); min-height: 100vh; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.top-help { font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tk { padding-top: 26px; padding-bottom: 60px; display: block; }
.tk:focus { outline: none; }
.tk-load, .tk-err { color: var(--mute); padding: 40px 0; }
.tk-err { color: var(--ink); font-weight: 600; }
.tk-no { font-size: 17px; }
#head { margin-top: 6px; font: 900 clamp(34px, 9.5vw, 46px)/.98 var(--font-display); font-stretch: 82%; letter-spacing: -.03em; text-wrap: balance; }
.tk-sub { margin-top: 8px; color: var(--mute); max-width: 44ch; }

.steps { list-style: none; margin: 22px 0 16px; padding: 18px 16px; background: var(--paper); border-radius: 16px; display: grid; gap: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 22px 1fr; column-gap: 12px; padding-bottom: 20px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps li.done::before { background: var(--ok); }
.steps .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper); display: grid; place-items: center; }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps li.done .dot::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.steps li.now .dot { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 0 5px rgba(0,0,0,.1); }
.steps .t { font-weight: 700; line-height: 1.25; padding-top: 1px; }
.steps li.todo .t { color: var(--mute); font-weight: 500; }
.steps .w { font-size: 13.5px; color: var(--mute); margin-top: 2px; }
.steps li.cancelled .dot { background: var(--bad); border-color: var(--bad); }

.tk-card { background: var(--paper); border-radius: 16px; padding: 16px; margin-bottom: 14px; display: grid; gap: 8px; }
.tk-l { font-size: 13px; color: var(--mute); }
.tk-jt { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tk-jt b { font: 800 22px/1.1 var(--font-display); font-stretch: 90%; letter-spacing: .01em; word-break: break-all; }
.tk-note { font-size: 14px; color: var(--mute); margin: 0; }
.tk-items { display: grid; gap: 6px; font-size: 15px; }
.tk-total { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-weight: 600; }
.tk-foot { color: var(--mute); font-size: 14px; margin-top: 18px; }
.tk-foot a { color: var(--ink); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14.5px; max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }

.where-now { display: grid; gap: 2px; }
.where-now b { font: 800 20px/1.15 var(--font-display); font-stretch: 90%; letter-spacing: -.01em; }
.where-now span { font-size: 14px; color: var(--mute); }
.scans { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.scans li { position: relative; padding: 0 0 14px 18px; font-size: 14.5px; }
.scans li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.scans li:first-child::before { background: var(--ink); }
.scans li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.scans li:last-child::after { display: none; }
.scans .s-t { color: var(--mute); font-size: 13px; }
.scans .s-p { color: var(--mute); font-size: 13px; }

/* Live rider map (meet-up deliveries) */
.live-eta { font: 900 clamp(24px, 7vw, 32px)/1.05 var(--font-display); font-stretch: 84%; letter-spacing: -.02em; }
.live-map { height: 320px; border-radius: 12px; overflow: hidden; background: var(--wash); isolation: isolate; }
.live-card.stale .live-eta { color: var(--mute); }
.live-card.stale .rider-ic { opacity: .45; }
.rider-ic { width: 60px; height: 60px; transition: opacity .3s; }
.rider-ic img { width: 60px; height: 60px; display: block; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.rider-ic.flip img { transform: scaleX(-1); }
.leaflet-marker-icon.flip img { transform: scaleX(-1); }
.dest-pin { width: 30px; height: 40px; position: relative; }
.dest-pin i { position: absolute; left: 3px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; background: #111; transform: rotate(-45deg); box-shadow: 0 3px 4px rgba(0,0,0,.35); }
.dest-pin i::after { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.live-map .leaflet-control-attribution { font-size: 10px; }
@media (prefers-reduced-motion: reduce) { .rider-ic { transition: none; } }

.jt-open { margin-top: 10px; display: inline-flex; text-decoration: none; }

/* Share card: the customer's link and progress toward the next reward */
.ref-h { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.3; }
.ref-dots { display: flex; gap: 6px; }
.ref-dots:empty { display: none; }
.ref-dots i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.ref-dots i.on { background: var(--ink); }
.ref-pt { margin: 0; font-size: 14.5px; font-weight: 600; }
.ref-fr { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ref-fr li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.ref-fr small { color: var(--mute); font-size: 13px; }
.ref-fr small.ok { color: var(--ok); font-weight: 600; }
.ref-link input { flex: 1; min-width: 0; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); color: var(--ink); }
