/* NEXUS Fleet · live demo. The owner's mark: ink #122e34, mint #00c3a9,
   amber #f1aa3e, paper #f4f6f2. No red. Mint and amber are text colours only
   on ink; on paper, text uses the -ink variants (4.8:1 and 4.6:1). */
:root {
  --ink: #122e34; --ink-2: #1b3f46; --ink-3: #24505a; --ink-deep: #0b2227;
  --mint: #00c3a9; --mint-ink: #007a6a; --amber: #f1aa3e; --amber-ink: #9a6200;
  --paper: #f4f6f2; --white: #fff; --line: rgba(18, 46, 52, .14); --line-d: rgba(244, 246, 242, .14);
  --muted: rgba(18, 46, 52, .7); --muted-d: rgba(244, 246, 242, .72);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink-deep); color: var(--paper); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
a { color: var(--mint); }

/* ── top bar ── */
.lv-app { min-height: 100dvh; display: flex; flex-direction: column; }
.lv-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--ink); border-bottom: 1px solid var(--line-d); flex-wrap: wrap; }
.lv-burger { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(244, 246, 242, .08); color: var(--paper); }
.lv-burger:hover { background: rgba(244, 246, 242, .16); }
.lv-burger--sm { width: 44px; height: 44px; }
.lv-brand img { display: block; height: 30px; width: auto; }
.lv-live { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); }
.lv-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: lv-pulse 1.6s ease-in-out infinite; }
@keyframes lv-pulse { 50% { opacity: .3; } }
.lv-views { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(244, 246, 242, .08); margin-left: auto; }
.lv-views button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--paper); font-weight: 700; }
.lv-views button[aria-pressed="true"] { background: var(--mint); color: var(--ink); }
.lv-auto { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-d); background: transparent; color: var(--paper); font-weight: 700; }
.lv-auto i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-d); }
.lv-auto[aria-pressed="true"] i { background: var(--mint); animation: lv-pulse 1.6s ease-in-out infinite; }
.lv-banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 0; padding: 8px 16px; background: var(--amber); color: var(--ink); font-weight: 700; }
.lv-banner button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-weight: 800; }
@media (max-width: 720px) { .lv-long { display: none; } .lv-views { order: 5; margin-left: 0; width: 100%; justify-content: stretch; } .lv-views button { flex: 1; padding: 0 8px; } .lv-auto { margin-left: auto; } .lv-live { display: none; } }

/* ── the desk ── */
.lv-main { flex: 1; }
.lv-desk { display: grid; grid-template-columns: 250px minmax(0, 1fr) 360px; grid-template-rows: minmax(420px, 1fr) auto; gap: 14px; padding: 14px 16px; background: var(--paper); color: var(--ink); min-height: calc(100dvh - 140px); }
.lv-desk h2 { margin: 0 0 10px; font-size: 1rem; }
.lv-fleet { grid-row: 1 / 3; display: grid; align-content: start; gap: 8px; }
.lv-fleet > div { display: grid; gap: 8px; }
.lv-truck { display: grid; grid-template-columns: 14px 1fr; gap: 2px 10px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); min-height: 48px; }
.lv-truck i { grid-row: 1 / 4; width: 12px; height: 12px; border-radius: 50%; background: var(--mint); }
.lv-truck.lv-mode-dispatched i { background: var(--amber); }
.lv-truck.lv-mode-arrived i, .lv-truck.lv-mode-released i { background: var(--ink-3); }
.lv-truck.is-focus { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint) inset; }
.lv-truck-name { font-weight: 800; }
.lv-truck-sub { font-size: .8rem; color: var(--muted); }
.lv-truck-live { font-size: .85rem; font-weight: 700; color: var(--mint-ink); }
.lv-mapcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lv-map { position: relative; flex: 1; min-height: 420px; border-radius: 18px; overflow: hidden; border: 2px solid var(--line); background: #dfe6e2; }
.lv-map-canvas { position: absolute; inset: 0; }
.lv-attrib { margin: 0; font-size: .78rem; color: var(--muted); }
.lv-pick { position: absolute; z-index: 5; left: 50%; top: 12px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; max-width: calc(100% - 24px); padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); pointer-events: auto; }
.lv-pick span { font-size: .85rem; color: var(--muted-d); }
.lv-pick button { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line-d); background: transparent; color: var(--paper); font-weight: 700; }
.lv-work { grid-row: 1 / 3; grid-column: 3; overflow: auto; max-height: calc(100dvh - 120px); padding-right: 2px; }
.lv-work-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lv-work h3 { margin: 16px 0 8px; font-size: .9rem; letter-spacing: .02em; }
.lv-work h3 b { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 10px; background: var(--line); text-align: center; }
.lv-log { grid-column: 2; }
.lv-log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 150px; overflow: auto; font-size: .85rem; }
.lv-log li { display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.lv-log time { color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-job, .lv-prob, .lv-report { padding: 12px; margin-bottom: 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--white); }
.lv-job { border-left: 5px solid var(--line); }
.lv-job.lv-st-unassigned { border-left-color: var(--amber); }
.lv-job.lv-st-on_the_way, .lv-job.lv-st-arrived, .lv-job.lv-st-working { border-left-color: var(--mint); }
.lv-job-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lv-stage, .lv-sev { flex: 0 0 auto; font-size: .7rem; font-weight: 800; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; border: 1.5px solid currentColor; color: var(--mint-ink); }
.lv-st-unassigned .lv-stage, .lv-sev--urgent { color: var(--amber-ink); }
.lv-sev--routine { color: var(--muted); }
.lv-job-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.lv-job-meta b { color: var(--ink); }
.lv-probs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.lv-probs li > span, .lv-probs li > div > span { display: inline-block; margin-right: 8px; font-size: .68rem; font-weight: 800; letter-spacing: .05em; padding: 1px 6px; border-radius: 6px; border: 1.5px solid currentColor; }
.lv-probs .is-urgent > span, .lv-probs .is-urgent > div > span { color: var(--amber-ink); }
.lv-probs .is-fixed > span, .lv-probs .is-fixed > div > span { color: var(--mint-ink); }
.lv-probs .is-fixed { opacity: .85; }
.lv-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: inherit; font-weight: 800; text-decoration: none; }
.lv-btn--go { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.lv-btn[disabled], .lv-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.lv-btn--wide { width: 100%; margin-top: 10px; }
.lv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-chip { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: inherit; font-weight: 700; }
.lv-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.lv-chip--map { border-style: dashed; }
.lv-label { margin: 12px 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.lv-fine { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
.lv-empty { margin: 4px 0 10px; color: var(--muted); font-size: .9rem; }
.lv-done { margin: 4px 0; font-size: .85rem; color: var(--muted); }
.lv-done b { color: inherit; }
.lv-live-line { margin: 8px 0 0; font-weight: 700; color: var(--mint-ink); font-size: .9rem; }
.lv-report { display: grid; gap: 8px; }
.lv-report label { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.lv-report input, .lv-report select, .lv-mini input { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); }
@media (max-width: 1180px) { .lv-desk { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto; } .lv-fleet { grid-row: auto; } .lv-work { grid-row: auto; grid-column: 1 / -1; max-height: none; } .lv-log { grid-column: 1 / -1; } }
@media (max-width: 760px) { .lv-desk { grid-template-columns: 1fr; padding: 12px; } .lv-mapcol { order: -1; } .lv-map { min-height: 380px; } .lv-fleet > div { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* ── map markers (Google overlay and drawn map share the look) ── */
.lv-g-layer { position: absolute; left: 0; top: 0; }
.lv-g-truck, .lv-g-pin { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.lv-g-truck i { position: relative; display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); border: 3px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.lv-g-truck i::after { content: ""; position: absolute; left: 50%; top: 50%; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--ink); transform: translate(-50%, -62%); }
.lv-g-truck i:not([style])::after { display: none; }
.lv-g-truck.is-focus i { width: 32px; height: 32px; box-shadow: 0 0 0 6px rgba(0, 195, 169, .3), 0 2px 6px rgba(0, 0, 0, .35); }
.lv-g-truck span, .lv-g-pin span { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); white-space: nowrap; padding: 1px 7px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 700 11px/1.5 system-ui, sans-serif; }
.lv-g-pin { transform: translate(-50%, -100%); }
.lv-g-pin i { display: block; width: 20px; height: 20px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--paper); border: 3px solid var(--ink); }
.lv-g-pin.is-active i { background: var(--amber); }
.lv-g-pin span { top: -26px; }
.lv-drawn { background: #e6ebe7; }
.lv-drawn svg { width: 100%; height: 100%; display: block; cursor: crosshair; }
.lv-d-ground { fill: #e6ebe7; }
.lv-d-streets { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.lv-drawn.is-dark, .lv-drawn.is-dark .lv-d-ground { background: #16373e; fill: #16373e; }
.lv-drawn.is-dark .lv-d-streets { stroke: #2a5a63; }
.lv-d-casing { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.lv-d-route { fill: none; stroke: var(--mint); stroke-linecap: round; stroke-linejoin: round; }
.lv-d-truck { fill: var(--mint); stroke: var(--ink); stroke-width: 3.5; }
.lv-d-truck.is-focus { stroke-width: 5; }
.lv-d-arrow { fill: var(--ink); }
.lv-d-pin { fill: var(--paper); stroke: var(--ink); stroke-width: 3.5; }
.lv-d-pin.is-active { fill: var(--amber); }
.lv-d-label { font: 800 15px system-ui, sans-serif; text-anchor: middle; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.lv-drawn.is-dark .lv-d-label { fill: var(--paper); stroke: var(--ink); }
.lv-d-note { position: absolute; right: 8px; bottom: 6px; font-size: 11px; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, .8); padding: 2px 6px; border-radius: 6px; }

/* ── the phones ── */
.lv-phones { display: grid; place-items: center; padding: 22px 16px; min-height: calc(100dvh - 140px); background: radial-gradient(circle at 50% 30%, var(--ink-2), var(--ink-deep) 70%); }
.lv-phone { position: relative; width: 390px; height: min(820px, calc(100dvh - 170px)); min-height: 640px; border-radius: 46px; border: 10px solid #061518; background: var(--ink); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lv-notch { position: absolute; z-index: 6; top: 8px; left: 50%; transform: translateX(-50%); width: 110px; height: 28px; border-radius: 20px; background: #061518; }
.lv-ph-top { display: flex; align-items: center; gap: 10px; padding: 44px 14px 10px; background: var(--ink); z-index: 3; }
.lv-who { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.lv-who select { flex: 1; min-width: 0; min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line-d); background: var(--ink-2); color: var(--paper); font-weight: 700; }
.lv-avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 900; font-size: 1.1rem; flex: 0 0 auto; }
.lv-avatar--sm { width: 34px; height: 34px; font-size: .95rem; }
.lv-ph-map { position: relative; flex: 1; min-height: 240px; background: #16373e; }
.lv-ph-card { padding: 16px 18px 22px; background: var(--ink); border-top: 1px solid var(--line-d); }
.lv-ph-card h3 { margin: 2px 0 4px; font-size: 1.45rem; line-height: 1.15; }
.lv-kick { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; color: var(--mint); }
.lv-big { margin: 4px 0 0; font-size: 1.6rem; font-weight: 900; color: var(--mint); font-variant-numeric: tabular-nums; }
.lv-sub { margin: 4px 0 0; color: var(--muted-d); }
.lv-speed { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 0; }
.lv-speed b { font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.lv-speed span { color: var(--muted-d); font-weight: 700; }
.lv-phones .lv-btn { border-color: var(--line-d); color: var(--paper); }
.lv-phones .lv-btn--go { color: var(--ink); border-color: var(--mint); }
.lv-ph-body { flex: 1; overflow: auto; padding: 4px 16px 24px; }
.lv-ph-h { margin: 12px 0 8px; font-size: 1.05rem; }
.lv-mjob { display: grid; gap: 4px; width: 100%; text-align: left; margin-bottom: 10px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line-d); background: var(--ink-2); color: var(--paper); }
.lv-mjob b { font-size: 1.1rem; }
.lv-mjob > span:not(.lv-stage) { color: var(--muted-d); font-size: .9rem; }
.lv-phones .lv-stage { justify-self: start; color: var(--mint); }
.lv-phones .lv-st-unassigned .lv-stage { color: var(--amber); }
.lv-phones .lv-live-line { color: var(--mint); }
.lv-phones .lv-empty, .lv-phones .lv-done, .lv-phones .lv-fine, .lv-phones .lv-job-meta { color: var(--muted-d); }
.lv-phones .lv-job-meta b { color: var(--paper); }
.lv-back { min-height: 44px; margin: 6px 0 2px; padding: 0 4px; border: 0; background: none; color: var(--mint); font-weight: 800; }
.lv-ph-title { margin: 2px 0 0; font-size: 1.35rem; }
.lv-ph-body h4 { margin: 18px 0 8px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-d); }
.lv-coming { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--ink-2); }
.lv-coming p { margin: 0; }
.lv-bar { height: 10px; margin: 12px 0 4px; border-radius: 6px; background: var(--ink-3); overflow: hidden; }
.lv-bar i { display: block; height: 100%; width: 2%; background: var(--mint); border-radius: 6px; transition: width .4s linear; }
.lv-probs--mech li { padding: 10px 12px; border-radius: 12px; background: var(--ink-2); }
.lv-probs--mech small { display: block; margin-top: 4px; color: var(--muted-d); }
.lv-probs--mech .lv-btn { margin-top: 8px; }
.lv-phones .lv-probs .is-urgent > div > span { color: var(--amber); }
.lv-phones .lv-probs .is-fixed > div > span { color: var(--mint); }
.lv-lines { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.lv-lines li { display: grid; grid-template-columns: 58px 1fr auto; gap: 8px; align-items: baseline; }
.lv-lines span { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--muted-d); }
.lv-lines .lv-total { border-top: 1px solid var(--line-d); padding-top: 6px; font-weight: 800; }
.lv-mini { display: grid; gap: 8px; margin-top: 8px; }
.lv-phones .lv-mini input { background: var(--ink); color: var(--paper); border-color: var(--line-d); }
.lv-phones .lv-chip { border-color: var(--line-d); }
.lv-phones .lv-chip[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.lv-donebox { margin-top: 14px; padding: 14px; border-radius: 14px; background: rgba(0, 195, 169, .14); color: var(--paper); font-weight: 700; }
@media (max-width: 460px) { .lv-phones { padding: 0; place-items: stretch; } .lv-phone { width: 100%; height: calc(100dvh - 118px); min-height: 560px; border-radius: 0; border: 0; box-shadow: none; } .lv-notch { display: none; } .lv-ph-top { padding-top: 10px; } }

/* ── the Spotify-style drawers: the page's, and one inside each phone ── */
.lv-drawer-back, .lv-ph-drawer { position: fixed; inset: 0; z-index: 50; background: rgba(6, 21, 24, 0); transition: background .22s; }
.lv-ph-drawer { position: absolute; z-index: 8; }
.lv-drawer-back.is-open, .lv-ph-drawer.is-open { background: rgba(6, 21, 24, .55); }
.lv-drawer, .lv-ph-sheet { position: absolute; left: 0; top: 0; bottom: 0; width: min(86%, 340px); display: flex; flex-direction: column; background: var(--ink); color: var(--paper); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 12px 0 40px rgba(0, 0, 0, .4); overflow: auto; }
.lv-drawer-back.is-open .lv-drawer, .lv-ph-drawer.is-open .lv-ph-sheet { transform: none; }
.lv-ph-sheet { padding-top: 40px; }
.lv-drawer-head { display: flex; align-items: center; gap: 12px; padding: 20px 16px 16px; border-bottom: 1px solid var(--line-d); }
.lv-drawer-head div { flex: 1; min-width: 0; display: grid; }
.lv-drawer-head span:not(.lv-avatar) { font-size: .82rem; color: var(--muted-d); }
.lv-drawer-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(244, 246, 242, .08); color: var(--paper); font-size: 1rem; }
.lv-drawer-list { display: grid; padding: 8px; }
.lv-drawer-list > button, .lv-drawer-list > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--paper); text-decoration: none; font-weight: 700; font-size: 1.02rem; text-align: left; }
.lv-drawer-list > button:hover, .lv-drawer-list > a:hover { background: rgba(244, 246, 242, .08); }
.lv-drawer-list em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--muted-d); }
.lv-drawer-list hr { width: 100%; border: 0; border-top: 1px solid var(--line-d); margin: 8px 0; }
.lv-ph-sheet .lv-label { margin: 14px 20px 0; color: var(--muted-d); }
.lv-drawer-foot { margin-top: auto; padding: 16px; font-size: .8rem; color: var(--muted-d); }
.lv-drawer-foot b { color: var(--mint); }

.lv-toast { position: fixed; z-index: 60; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); border: 1.5px solid var(--mint); }
.lv-foot { margin: 0; padding: 12px 16px 18px; font-size: .8rem; color: var(--muted-d); background: var(--ink-deep); }
@media (prefers-reduced-motion: reduce) { .lv-live i, .lv-auto i { animation: none; } .lv-drawer, .lv-ph-sheet, .lv-bar i { transition: none; } }

/* ══ LANDSCAPE FIRST (owner, 2026-09-24): the app is used mostly sideways ══
   The driver's device is a phone mounted sideways in the cab: map on the left,
   the job on the right. The mechanic's is a landscape tablet on the bench: jobs
   beside the job. The desk has layouts for landscape phones and tablets. */
.lv-full, .lv-rotate { display: none; }
.lv-phone--driver { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); width: min(1000px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 170px)); min-height: 380px; border-radius: 40px; }
.lv-phone--driver .lv-ph-map { grid-column: 1; grid-row: 1 / 3; min-height: 0; }
.lv-phone--driver .lv-ph-top { grid-column: 2; grid-row: 1; padding: 14px 14px 8px; }
.lv-phone--driver .lv-ph-card { grid-column: 2; grid-row: 2; border-top: 0; border-left: 1px solid var(--line-d); overflow: auto; }
.lv-phone--mech { width: min(1000px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 170px)); min-height: 400px; border-radius: 30px; }
.lv-phone--mech .lv-ph-top { padding: 14px 14px 8px 18px; }
.lv-phone .lv-notch { display: none; }
.lv-phone--driver .lv-ph-map { border-left: 0; }
.lv-ph-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; padding: 0; }
.lv-m-list { overflow: auto; padding: 4px 14px 20px 18px; border-right: 1px solid var(--line-d); }
.lv-m-detail { overflow: auto; padding: 4px 20px 22px; }
.lv-m-empty { display: grid; place-items: center; color: var(--muted-d); text-align: center; }
.lv-mjob[aria-current="true"] { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint) inset; }
.lv-done--btn { display: block; width: 100%; text-align: left; min-height: 40px; padding: 6px 4px; border: 0; background: none; color: var(--muted-d); font: inherit; }
.lv-ph-body .lv-back { display: none; }
/* narrow portrait: one pane at a time, and a hint to turn the phone */
@media (max-width: 700px) and (orientation: portrait) {
  .lv-rotate { display: block; margin: 0; padding: 8px 16px; background: var(--ink-2); color: var(--paper); font-size: .85rem; font-weight: 700; text-align: center; }
  .lv-phones { padding: 0; place-items: stretch; }
  .lv-phone--driver, .lv-phone--mech { width: 100%; height: calc(100dvh - 150px); min-height: 560px; border-radius: 0; border: 0; box-shadow: none; }
  .lv-phone--driver { display: flex; flex-direction: column; }
  .lv-phone--driver .lv-ph-card { border-left: 0; border-top: 1px solid var(--line-d); }
  .lv-phone .lv-notch { display: none; }
  .lv-ph-top, .lv-phone--driver .lv-ph-top { padding: 10px 14px; }
  .lv-ph-body { display: block; padding: 4px 16px 24px; }
  .lv-m-list, .lv-m-detail { padding: 0; border: 0; overflow: visible; }
  .lv-ph-body.has-open .lv-m-list, .lv-ph-body:not(.has-open) .lv-m-detail { display: none; }
  .lv-ph-body .lv-back { display: inline-flex; align-items: center; }
}
/* landscape phones (short screens): the devices ARE the screen, the bar is one slim row */
@media (max-height: 520px) and (orientation: landscape) {
  .lv-top { padding: 6px 12px; gap: 8px; flex-wrap: nowrap; }
  .lv-burger { width: 40px; height: 40px; }
  .lv-brand img { height: 22px; }
  .lv-live, .lv-long { display: none; }
  .lv-views button { min-height: 36px; padding: 0 12px; }
  .lv-auto { min-height: 36px; padding: 0 10px; }
  .lv-phones { padding: 0; place-items: stretch; min-height: 0; }
  .lv-phone--driver, .lv-phone--mech { width: 100%; height: calc(100dvh - 53px); min-height: 0; border-radius: 0; border: 0; box-shadow: none; }
  .lv-phone--driver { grid-template-columns: minmax(0, 1fr) 280px; }
  .lv-phone .lv-notch { display: none; }
  .lv-ph-card h3 { font-size: 1.2rem; }
  .lv-big { font-size: 1.3rem; }
  .lv-speed b { font-size: 2.4rem; }
  .lv-ph-body { grid-template-columns: 250px minmax(0, 1fr); }
  .lv-desk { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); gap: 8px; padding: 8px; min-height: 0; height: calc(100dvh - 53px); }
  .lv-fleet { grid-column: 1; grid-row: 1; }
  .lv-fleet h2 { display: none; }
  .lv-fleet > div { display: flex; gap: 6px; overflow-x: auto; }
  .lv-truck { flex: 0 0 auto; padding: 6px 10px; grid-template-columns: 10px auto; }
  .lv-truck-sub { display: none; }
  .lv-mapcol { grid-column: 1; grid-row: 2; min-height: 0; }
  .lv-map { min-height: 0; }
  .lv-attrib { display: none; }
  .lv-work { grid-column: 2; grid-row: 1 / 3; max-height: none; }
  .lv-log { display: none; }
  .lv-foot { display: none; }
}
/* landscape tablets and small laptops: map beside the work, trucks as a strip */
@media (min-width: 761px) and (max-width: 1179px) and (min-height: 521px) {
  .lv-desk { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto minmax(360px, 1fr) auto; }
  .lv-fleet { grid-column: 1; grid-row: 1; }
  .lv-fleet h2 { display: none; }
  .lv-fleet > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lv-mapcol { grid-column: 1; grid-row: 2; }
  .lv-work { grid-column: 2; grid-row: 1 / 4; max-height: calc(100dvh - 110px); }
  .lv-log { grid-column: 1; grid-row: 3; }
}
/* ?embed=desk: the dispatch desk alone, inside another site's page */
.lv-embed .lv-views, .lv-embed .lv-top .lv-burger, .lv-embed .lv-foot, .lv-embed .lv-rotate, .lv-embed-desk [data-screen="driver"], .lv-embed-desk [data-screen="mech"] { display: none !important; }
.lv-embed .lv-full { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 800; text-decoration: none; margin-left: 8px; }
.lv-embed .lv-auto { margin-left: auto; }
.lv-embed .lv-top { position: static; padding: 8px 14px; flex-wrap: nowrap; }
.lv-embed-desk .lv-desk { min-height: 0; height: calc(100dvh - 57px); grid-template-rows: auto minmax(0, 1fr); }
.lv-embed-desk .lv-map { min-height: 0; }
.lv-embed-desk .lv-log { display: none; }
.lv-embed-desk .lv-fleet { grid-row: 1 / 3; }
@media (max-width: 1179px) { .lv-embed-desk .lv-desk { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); } .lv-embed-desk .lv-fleet { grid-column: 1; grid-row: 1; } .lv-embed-desk .lv-fleet h2 { display: none; } .lv-embed-desk .lv-fleet > div { display: flex; gap: 6px; overflow-x: auto; } .lv-embed-desk .lv-truck { flex: 0 0 auto; } .lv-embed-desk .lv-mapcol { grid-column: 1; grid-row: 2; } .lv-embed-desk .lv-work { grid-column: 2; grid-row: 1 / 3; max-height: none; } }
@media (min-width: 1180px) { .lv-embed-desk .lv-mapcol { grid-row: 1 / 3; } }

.lv-phone--driver .lv-ph-top { padding-right: 22px; }
@media (max-width: 1100px) { .lv-long, .lv-live { display: none; } }
/* Fill the screen by layout, not by arithmetic: the bar's height is whatever it is. */
@media (max-height: 520px) and (orientation: landscape) {
  .lv-app { height: 100dvh; min-height: 0; }
  .lv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .lv-stagebox > section { flex: 1; min-height: 0; }
  .lv-desk, .lv-phone--driver, .lv-phone--mech { height: 100%; }
}
.lv-embed .lv-app { height: 100dvh; min-height: 0; }
.lv-embed-desk .lv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lv-embed-desk .lv-desk { flex: 1; height: auto; min-height: 0; }

/* ══ ALL THREE (owner, 2026-09-24): the desk on a monitor in the back, the
   driver's phone sideways in front, the mechanic's phone upright beside it.
   Drawn at 1600×930 and scaled as one piece by fitStage() in live.mjs. ══ */
.lv-stagebox { display: contents; }
.lv-stage-on .lv-main { position: relative; overflow: hidden; flex: none; background: radial-gradient(ellipse 70% 60% at 50% 38%, #24505a 0%, #102d33 55%, var(--ink-deep) 100%); }
.lv-stage-on .lv-stagebox { display: block; position: absolute; top: 0; left: 0; width: 1600px; height: 930px; transform-origin: 0 0; }
.lv-stage-on .lv-foot, .lv-stage-on .lv-rotate { display: none; }
/* the monitor */
.lv-stage-on .lv-desk { position: absolute; left: 160px; top: 20px; width: 1280px; height: 700px; min-height: 0; box-sizing: border-box; padding: 12px; gap: 12px; border: 14px solid #0a1a1d; border-radius: 20px; box-shadow: 0 0 0 2px #21424a, 0 50px 90px rgba(0, 0, 0, .55); overflow: hidden;
  grid-template-columns: 240px minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr) 120px; }
.lv-stage-on .lv-fleet { grid-column: 1; grid-row: 1 / 3; }
.lv-stage-on .lv-mapcol { grid-column: 2; grid-row: 1; min-height: 0; }
.lv-stage-on .lv-map { min-height: 0; }
.lv-stage-on .lv-work { grid-column: 3; grid-row: 1 / 3; max-height: none; overflow: auto; }
.lv-stage-on .lv-log { grid-column: 2; grid-row: 2; display: block; overflow: hidden; }
.lv-stage-on .lv-log ol { max-height: 84px; }
.lv-stage-on .lv-stagebox::before { content: ""; position: absolute; left: 740px; top: 718px; width: 120px; height: 74px; background: linear-gradient(90deg, #0a1a1d, #21424a 45%, #0a1a1d); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.lv-stage-on .lv-stagebox::after { content: ""; position: absolute; left: 620px; top: 790px; width: 360px; height: 16px; border-radius: 10px; background: linear-gradient(#21424a, #0a1a1d); box-shadow: 0 18px 30px rgba(0, 0, 0, .45); }
/* the driver's phone, sideways, in front on the left */
.lv-stage-on .lv-phones[data-screen="driver"] { position: absolute; left: 40px; top: 548px; width: 700px; height: 340px; min-height: 0; padding: 0; background: none; display: block; z-index: 2; }
.lv-stage-on .lv-phone--driver { width: 100%; height: 100%; min-height: 0; border: 11px solid #061518; border-radius: 40px; grid-template-columns: minmax(0, 1fr) 260px; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.lv-stage-on .lv-phone--driver .lv-ph-card h3 { font-size: 1.3rem; }
.lv-stage-on .lv-phone--driver .lv-big { font-size: 1.35rem; }
/* the mechanic's phone, upright, in front on the right */
.lv-stage-on .lv-phones[data-screen="mech"] { position: absolute; left: 1250px; top: 300px; width: 320px; height: 610px; min-height: 0; padding: 0; background: none; display: block; z-index: 3; }
.lv-stage-on .lv-phone--mech { width: 100%; height: 100%; min-height: 0; border: 11px solid #061518; border-radius: 44px; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.lv-stage-on .lv-phone--mech .lv-ph-top { padding: 26px 14px 8px; }
.lv-stage-on .lv-phone--mech .lv-notch { display: block; top: 8px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; }
.lv-stage-on .lv-ph-body { display: block; padding: 4px 14px 20px; }
.lv-stage-on .lv-m-list, .lv-stage-on .lv-m-detail { padding: 0; border: 0; overflow: visible; }
.lv-stage-on .lv-ph-body.has-open .lv-m-list, .lv-stage-on .lv-ph-body:not(.has-open) .lv-m-detail { display: none; }
.lv-stage-on .lv-ph-body .lv-back { display: inline-flex; align-items: center; }
/* the desk stays a desk even when the window is small: the whole scene scales instead */
.lv-stage-on .lv-truck-sub, .lv-stage-on .lv-fleet h2, .lv-stage-on .lv-attrib { display: revert; }
.lv-stage-on .lv-fleet > div { display: grid; gap: 8px; }
.lv-stage-on .lv-truck { padding: 12px; }

.lv-stage-on .lv-fleet > div { grid-template-columns: 1fr; }
.lv-stage-on .lv-phone--driver .lv-who select { font-size: .85rem; padding: 0 6px; }

/* ══ TURN-BY-TURN, in NEXUS (2026-09-24): the next move big, the one after
   small, then time to arrival. Mint on ink only. ══ */
.lv-turn { display: flex; align-items: center; gap: 14px; margin: 2px 0 6px; }
.lv-arrow { flex: 0 0 auto; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--mint); color: var(--ink); padding: 10px; }
.lv-arrow svg { display: block; }
.lv-turn b { display: block; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.lv-turn span { display: block; margin-top: 4px; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.lv-then { margin: 0 0 8px; min-height: 1.2em; color: var(--muted-d); font-size: .9rem; font-weight: 600; }
.lv-big--sm { font-size: 1.15rem !important; margin-top: 2px; }
.lv-voice[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.lv-stage-on .lv-arrow { width: 54px; height: 54px; }
.lv-stage-on .lv-turn b { font-size: 1.6rem; }
.nx-map .maplibregl-ctrl-attrib { font-size: 10px; }
