@import url("../assets/css/tokens.css");

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.45 var(--font); -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--go); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

/* Phone shell: full-bleed on phones, framed on desktop */
.shell { position: relative; width: 100%; max-width: 440px; height: 100%; margin-inline: auto; background: var(--paper); display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 600px) and (min-height: 760px) {
  body { display: grid; place-items: center; padding: 24px 16px; }
  .shell { height: min(880px, calc(100vh - 48px)); border-radius: 36px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(var(--shadow),.35); }
}
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.scroll { flex: 1; overflow-y: auto; padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 20px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--paper); }
.bar-title { font-weight: 600; font-size: 1rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ground); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo img { height: 26px; width: auto; }
.logo .mark { height: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--ground); font-size: .88rem; font-weight: 500; }
.pill svg { width: 16px; height: 16px; }
.stepcount { font-size: .88rem; color: var(--muted); min-width: 44px; text-align: right; }
.foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--paper); display: grid; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; font: 600 1.05rem/1 var(--font); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--action); color: #fff; }
.btn-secondary { background: var(--ground); color: var(--ink); }
.btn-go { background: var(--go); color: #fff; }
.btn-sm { min-height: 44px; font-size: .95rem; }
.link { background: none; border: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: .95rem; padding: 10px; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.danger { color: var(--warn); font-size: .9rem; }
.danger b { font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: grid; gap: 14px; align-content: space-between; min-height: 108px; padding: 16px; text-align: left; background: var(--ground); border: 0; border-radius: var(--r); cursor: pointer; }
.tile:hover { background: var(--ground-2); }
.tile svg { width: 26px; height: 26px; }
.tile b { font-weight: 600; font-size: 1.05rem; }

.group-label { font-weight: 600; font-size: 1rem; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px; border-radius: var(--r-sm); background: var(--ground); cursor: pointer; font-weight: 500; border: 2px solid transparent; }
.opt input { accent-color: var(--action); width: 20px; height: 20px; }
.opt:has(input:checked) { border-color: var(--action); background: var(--paper); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--ground); padding: 4px; border-radius: 999px; }
.seg label { text-align: center; padding: 11px 4px; border-radius: 999px; font-size: .92rem; font-weight: 500; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--paper); box-shadow: 0 1px 3px rgba(var(--shadow),.14); font-weight: 600; }
.input, textarea.input { width: 100%; min-height: 54px; padding: 14px 16px; border: 0; border-radius: var(--r-sm); background: var(--ground); font: 400 1rem/1.4 var(--font); color: var(--ink); }
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--action); background: var(--paper); }
.field { display: grid; gap: 8px; }
.field > span { font-weight: 600; }
.field small { color: var(--muted); font-size: .86rem; }
.note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--go-soft); font-size: .95rem; }
.note svg { width: 20px; height: 20px; color: var(--go); margin-top: 1px; }
.photo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.add-photo { width: 72px; height: 72px; border-radius: 12px; background: var(--ground); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.add-photo svg { width: 24px; height: 24px; }
.live { display: flex; gap: 8px; align-items: center; color: var(--go); font-weight: 600; font-size: .95rem; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--go); flex: none; }

.lines { display: grid; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.line:last-child { border-bottom: 0; }
.line small { display: block; color: var(--muted); font-size: .86rem; }
.line .amt { white-space: nowrap; font-weight: 500; }
.line.total { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.summary { display: grid; gap: 4px; padding-bottom: 4px; }
.pay-opt { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border-radius: var(--r-sm); background: var(--ground); font-weight: 600; }
.pay-opt span:last-child { font-weight: 400; color: var(--muted); font-size: .9rem; }

/* Matching */
.pulse { position: relative; width: 200px; height: 200px; margin: 24px auto 4px; display: grid; place-items: center; }
.pulse i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--go); opacity: 0; animation: ring 2.4s ease-out infinite; }
.pulse i:nth-child(2) { animation-delay: .8s; }
.pulse i:nth-child(3) { animation-delay: 1.6s; }
.pulse b { width: 20px; height: 20px; border-radius: 50%; background: var(--go); }
@keyframes ring { 0% { transform: scale(.15); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--muted); }
.checklist li.done { color: var(--ink); }
.checklist li i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.checklist li.done i { background: var(--go); border-color: var(--go); }
.checklist li.done i::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
@media (prefers-reduced-motion: reduce) { .pulse i { animation: none; opacity: .4; } }

/* Tracking */
.map { position: relative; flex: 0 0 44%; min-height: 220px; background: #e6ebf2; overflow: hidden; }
.map svg { width: 100%; height: 100%; display: block; }
.map-top { position: absolute; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top, 0px)); display: flex; justify-content: space-between; gap: 8px; z-index: 3; }
.map-top .pill { background: var(--paper); box-shadow: 0 1px 4px rgba(var(--shadow),.18); }
.sheet { flex: 1; min-height: 0; margin-top: -20px; position: relative; z-index: 2; background: var(--paper); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; }
.eta-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eta-big { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1; }
.eta-big small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.status-h { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.status-sub { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.prog { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.prog i { height: 4px; border-radius: 2px; background: var(--line); }
.prog i.on { background: var(--go); }
.prog i.done { background: var(--ink); }
.pro { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--ground); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; }
.pro-name { font-weight: 600; font-size: 1.05rem; }
.pro-meta { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pro-meta svg { width: 14px; height: 14px; fill: var(--ink); }
.plate { font-weight: 600; font-size: .85rem; border: 1.5px solid var(--ink); border-radius: 6px; padding: 5px 7px; font-variant-numeric: tabular-nums; }
.actions3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.act { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--r-sm); border: 0; background: var(--ground); cursor: pointer; font-size: .86rem; font-weight: 500; }
.act svg { width: 20px; height: 20px; }
.divider { height: 1px; background: var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; font-size: .95rem; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline li time { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline li.now span { font-weight: 600; }

/* Notification */
.toast { position: absolute; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 50; background: var(--paper); border-radius: 18px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(var(--shadow),.22); display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; transform: translateY(-140%); visibility: hidden; transition: transform .3s ease, visibility .3s; }
.toast.show { transform: translateY(0); visibility: visible; }
.toast svg { width: 34px; height: 34px; }
.toast b { display: block; font-size: .95rem; }
.toast span { font-size: .9rem; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Bottom sheet */
.modal { position: absolute; inset: 0; z-index: 40; background: rgba(var(--shadow),.45); display: flex; align-items: flex-end; }
.modal-card { width: 100%; max-height: 90%; overflow-y: auto; background: var(--paper); border-radius: 24px 24px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; }

.stars { display: flex; gap: 4px; justify-content: center; }
.stars button { background: none; border: 0; cursor: pointer; padding: 6px; }
.stars svg { width: 38px; height: 38px; fill: var(--line); }
.stars button.on svg { fill: var(--ink); }

.demo { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--ground); border-top: 1px solid var(--line); }
.demo::before { content: "Prototype"; font-size: .8rem; color: var(--muted); align-self: center; margin-right: 4px; }
.demo button { border: 0; border-radius: 999px; padding: 8px 12px; background: var(--paper); color: var(--ink); font: 500 .82rem/1 var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }

/* Tradie app */
.switch { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: var(--r); border: 0; background: var(--ground); cursor: pointer; text-align: left; }
.switch b { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; display: block; }
.switch small { color: var(--muted); font-size: .92rem; }
.knob { width: 60px; height: 34px; border-radius: 17px; background: #c5cedc; position: relative; flex: none; transition: background .2s; }
.knob::after { content: ""; position: absolute; left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch[aria-pressed="true"] { background: var(--go-soft); }
.switch[aria-pressed="true"] .knob { background: var(--go); }
.switch[aria-pressed="true"] .knob::after { transform: translateX(26px); }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats3 div { background: var(--ground); border-radius: var(--r-sm); padding: 14px; }
.stats3 b { display: block; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats3 span { font-size: .84rem; color: var(--muted); }
.offer { display: grid; gap: 16px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.facts div { background: var(--ground); border-radius: var(--r-sm); padding: 12px; }
.facts b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.facts span { font-size: .82rem; color: var(--muted); }
.cd { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; position: relative; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.cd::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--action) calc(var(--p, 1) * 360deg), var(--line) 0); }
.cd::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper); }
.cd span { position: relative; z-index: 1; }
.waiting { text-align: center; padding: 8px 0; display: grid; gap: 4px; justify-items: center; }
.waiting .pulse { width: 120px; height: 120px; margin: 4px auto; }
.qitem { display: grid; grid-template-columns: minmax(0, 1fr) 92px 44px; gap: 8px; align-items: center; }
.qitem .icon-btn { background: transparent; color: var(--muted); }
.big-action { min-height: 64px; font-size: 1.15rem; }
.steps-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-size: .78rem; color: var(--muted); }
.steps-mini span { padding-top: 8px; border-top: 4px solid var(--line); }
.steps-mini span.on { border-color: var(--go); color: var(--ink); font-weight: 600; }
.steps-mini span.done { border-color: var(--ink); color: var(--ink); }

/* v2: offers model */
.note.warn { background: #fdf3e2; }
.note.warn svg { color: #9a5b00; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--ground); cursor: pointer; }
.toggle-row b { display: block; font-weight: 600; }
.toggle-row small { color: var(--muted); font-size: .86rem; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--go); flex: none; }
.waiting-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; background: var(--ground); border-radius: var(--r); }
.small-pulse { width: 48px; height: 48px; margin: 0; }
.small-pulse b { width: 12px; height: 12px; }
.offer-list { display: grid; gap: 12px; }
.offer-card { border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 14px; animation: in .35s ease; }
.offer-card.first { border-color: var(--ink); }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .offer-card { animation: none; } }
.offer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.offer-eta b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.offer-eta span { font-size: .88rem; color: var(--muted); }
.offer-price { text-align: right; }
.offer-price b { display: block; font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.offer-price span { display: block; white-space: nowrap; font-size: .82rem; color: var(--muted); }
.tagline { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .78rem; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--ground); }
.tag.go { background: var(--go-soft); color: var(--go); }
.ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ratings div { background: var(--ground); border-radius: var(--r-sm); padding: 10px 12px; }
.ratings b { display: inline-flex; align-items: center; gap: 4px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ratings b svg { width: 14px; height: 14px; fill: var(--ink); }
.ratings span { display: block; font-size: .8rem; color: var(--muted); }
.who-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; }
.who-row .avatar { width: 44px; height: 44px; font-size: .95rem; }
.arrive { display: flex; justify-content: space-between; align-items: baseline; padding: 16px; border-radius: var(--r); background: var(--go-soft); }
.arrive span { color: var(--go); font-weight: 500; }
.arrive b { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 44px; color: var(--muted); position: relative; }
.steps li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); justify-self: center; position: relative; z-index: 1; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 29px; height: calc(100% - 14px); width: 2px; background: var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done i { background: var(--ink); border-color: var(--ink); }
.steps li.done:not(:last-child)::before { background: var(--ink); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now i { background: var(--go); border-color: var(--go); box-shadow: 0 0 0 4px var(--go-soft); }
.steps li time { font-size: .88rem; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.actions2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eta-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eta-pick label { display: grid; gap: 2px; text-align: center; padding: 12px 6px; border-radius: var(--r-sm); background: var(--ground); cursor: pointer; border: 2px solid transparent; }
.eta-pick input { position: absolute; opacity: 0; pointer-events: none; }
.eta-pick b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.eta-pick span { font-size: .78rem; color: var(--muted); }
.eta-pick label:has(input:checked) { border-color: var(--action); background: var(--paper); }
.banner { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--go-soft); font-size: .95rem; }
.banner svg { width: 20px; height: 20px; color: var(--blue); }
.banner b { display: block; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.days label { text-align: center; padding: 10px 0; border-radius: var(--r-sm); background: var(--ground); font-size: .82rem; font-weight: 500; cursor: pointer; border: 2px solid transparent; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days label:has(input:checked) { border-color: var(--action); background: var(--paper); }

/* Cancellation */
.cancel-box { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-sm); background: var(--ground); }
.cancel-box b { font-size: 1.05rem; }
.offer-price b { font-size: 1.35rem; }

/* ---------- Production tradie app ---------- */
.avatar.sm { width: 40px; height: 40px; font-size: .9rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-weight: 500; }
.ticks li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/14px no-repeat; margin-top: 2px; }
.progress4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 20px; }
.progress4 i { height: 4px; border-radius: 2px; background: var(--line); }
.progress4 i.on { background: var(--action); }
.ap-panel { display: grid; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { padding: 9px 12px; border-radius: 999px; background: var(--ground); font-size: .9rem; font-weight: 500; cursor: pointer; border: 2px solid transparent; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label:has(input:checked) { border-color: var(--action); background: var(--paper); }
.upload-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--ground); }
.upload-row b { display: block; font-weight: 600; }
.upload-row small { display: block; color: var(--muted); font-size: .84rem; }
.upload-row .btn { width: auto; flex: none; background: var(--paper); }
.upload-row.done small { color: var(--go); font-weight: 600; }
.checklist.big li { font-size: 1rem; align-items: start; }
.checklist.big li small { display: block; color: var(--muted); font-size: .86rem; }
.checklist li.warn i { border-color: var(--warn); }
.tabbar { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--paper); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar button { border: 0; background: none; padding: 14px 4px 12px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.tabbar button[aria-current="page"] { color: var(--action); box-shadow: inset 0 3px 0 var(--action); }
.job-card { display: grid; gap: 8px; padding: 16px; border-radius: var(--r); background: var(--navy); color: #fff; cursor: pointer; border: 0; text-align: left; }
.job-card small { color: #c9d3e6; }
.job-card b { font-size: 1.2rem; }
.offer-row { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r); border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; text-align: left; animation: in .35s ease; }
.offer-row .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.offer-row b { font-size: 1.05rem; }
.offer-row .cdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--action); }
.quote-desc:empty { display: none; }
.quote-desc { background: var(--ground); border-radius: var(--r-sm); padding: 12px 14px; font-size: .95rem; }
.qline { display: grid; grid-template-columns: minmax(0, 1fr) 104px 40px; gap: 6px; align-items: center; }
.qline .icon-btn { width: 40px; height: 40px; background: transparent; color: var(--muted); }
.pay-el { padding: 4px 0; min-height: 60px; }
.status-tag { font-size: .78rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--ground); white-space: nowrap; }
.status-tag.ok { background: var(--go-soft); color: var(--go); }
.status-tag.bad { background: var(--warn-soft); color: var(--warn); }

/* ---------------------------------------------------------------- live location */
.loc-ask { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-sm); background: var(--go-soft); }
.loc-ask b { font-size: 1rem; }
.loc-ask .small { color: var(--ink-2); margin: 0; }

.map-wrap { height: 220px; border-radius: var(--r-sm); overflow: hidden; background: var(--ground); position: relative; }
.map-wrap .maplibregl-ctrl-bottom-right { font-size: 10px; }
/* Fixes stopped arriving: dim the moving marker rather than let a stale position look live. */
.map-wrap.map-stale .mk-me { opacity: .45; }
.map-wrap.map-stale .mk-pulse { animation: none; }

.mk { position: relative; display: block; }
.mk-dest { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ink); box-shadow: 0 0 0 2.5px var(--paper), 0 2px 6px rgba(var(--shadow), .4); }
.mk-me { width: 22px; height: 22px; }
.mk-me .mk-core { position: absolute; inset: 0; border-radius: 50%; background: var(--action); box-shadow: 0 0 0 3px var(--paper), 0 2px 8px rgba(var(--shadow), .45); }
.mk-me .mk-pulse { position: absolute; inset: -9px; border-radius: 50%; background: var(--action); opacity: .25; animation: mk-pulse 2s ease-out infinite; }
/* A triangle pointing the way they're driving. Hidden when the phone can't tell us a heading. */
.mk-me .mk-head { position: absolute; left: 50%; top: -11px; margin-left: -5px; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--action);
  transform-origin: 50% 19px; filter: drop-shadow(0 0 1.5px var(--paper)); }
@keyframes mk-pulse { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mk-me .mk-pulse { animation: none; opacity: .2; } }

/* "You look like you're there" — makes the arrive button the obvious next tap, without pressing it. */
.btn.at-door { animation: at-door 1.6s ease-in-out infinite; }
@keyframes at-door { 0%, 100% { box-shadow: 0 0 0 0 rgba(23, 75, 255, .45); } 50% { box-shadow: 0 0 0 10px rgba(23, 75, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .btn.at-door { animation: none; outline: 3px solid var(--go-soft); outline-offset: 2px; } }

/* 31 Oct 2026: chosen trade tile, scheduled window, chat */
.tile[aria-checked="true"] { background: var(--paper); box-shadow: inset 0 0 0 2px var(--action); }
.tile[aria-checked="true"] svg { color: var(--action); }
.sched { display: grid; gap: 8px; margin-top: 10px; }
.sched select.input { appearance: auto; }
.act { position: relative; }
.badge { position: absolute; top: 6px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--action); color: #fff; font: 700 .72rem/20px var(--font); text-align: center; }
.chat { gap: 8px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; background: var(--ground); line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { justify-self: end; background: var(--action); color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { justify-self: start; border-bottom-left-radius: 6px; }
.bubble.sys { justify-self: center; background: none; color: var(--muted); font-size: .85rem; text-align: center; }
.bubble time { display: block; margin-top: 4px; font-size: .72rem; opacity: .7; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-form .btn { width: auto; padding: 0 18px; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); max-width: 22em; }
.evidence { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-sm); background: var(--ground); }
.evidence ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.evidence li.done { color: var(--muted); text-decoration: line-through; }
.actions3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.actions3 .btn { width: 100%; }
.eta-pick label.off { opacity: .45; pointer-events: none; }
/* The preview banner sits above the app; keep the app's footer buttons on screen underneath it. */
@media (max-width: 599px), (max-height: 759px) {
  body:has(#tt-preview-banner) { display: flex; flex-direction: column; }
  body:has(#tt-preview-banner) .shell { flex: 1; min-height: 0; height: auto; }
}
