/* Load the van (Dan, 18-19 Nov 2026): the app's own copy of the signed-off preview's styles (load-the-van-preview.css),
   tokens from global.css, light and dark. Only drawn in the new look, behind the Load the van switch. */
.ltv-root { position: fixed; inset: 0; z-index: 1250; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--bg); color: var(--text); }
.ltv-root *, .ltv-root *::before, .ltv-root *::after, .ltv-scrim *, .ltv-invan * { box-sizing: border-box; }
.ltv-inner { max-width: 520px; margin: 0 auto; padding: 12px 16px 24px; }
html.ltv-open, html.ltv-open body { overflow: hidden; }
.ltv-scrim { z-index: 1300 !important; }
.ltv-toast { z-index: 1350 !important; }
#panel-stops .ltv-offer { margin: 0 0 12px; text-align: left; }
.ltv-invan { margin: 10px 0 4px; }

.ltv-h1 { margin: 6px 0 4px; font-size: 1.6rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.ltv-sub { margin: 0 0 14px; font-size: 0.95rem; line-height: 1.4; color: var(--text-muted); }
.ltv-label { display: block; margin: 16px 0 6px; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.ltv-top { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.ltv-back { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 700; padding: 6px 2px; cursor: pointer; }
.ltv-top .ltv-grow { flex: 1 1 auto; }

.ltv-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); margin: 0 0 12px; }
.ltv-btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 12px 18px; border: 0; border-radius: 16px;
  background: var(--primary); color: #fff; font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.ltv-btn-primary:disabled { opacity: 0.55; cursor: default; }
.ltv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card); color: var(--text); font: inherit; font-size: 0.98rem; font-weight: 600; cursor: pointer; }
.ltv-btn.ltv-wide { width: 100%; }
.ltv-link { border: 0; background: none; padding: 4px 2px; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; }
.ltv-row2 { display: flex; gap: 10px; margin-top: 10px; }
.ltv-row2 > * { flex: 1 1 0; }

/* Round planned: the offer */
.ltv-offer { display: flex; align-items: center; gap: 12px; }
.ltv-offer-ic { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(37, 99, 235, 0.1); color: var(--primary); font-size: 1.3rem; }
.ltv-offer-text { flex: 1 1 auto; min-width: 0; }
.ltv-offer-text strong { display: block; font-size: 1.05rem; }
.ltv-offer-text small { color: var(--text-muted); font-size: 0.88rem; }
.ltv-x { border: 0; background: none; color: var(--text-muted); font-size: 1.4rem; line-height: 1; padding: 4px 6px; cursor: pointer; }

/* Layout chooser */
.ltv-opts { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ltv-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: 16px; background: var(--card);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ltv-opt[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.ltv-opt-text { flex: 1 1 auto; min-width: 0; }
.ltv-opt-text strong { display: block; font-size: 1.02rem; }
.ltv-opt-text small { color: var(--text-muted); font-size: 0.88rem; }
.ltv-dot { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); }
.ltv-opt[aria-pressed="true"] .ltv-dot { border: 7px solid var(--primary); }
.ltv-cfg { margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--hover-bg); }
.ltv-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ltv-seg button { min-width: 56px; min-height: 42px; border: 0; background: var(--card); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.ltv-seg button + button { border-left: 1px solid var(--border); }
.ltv-seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.ltv-input, .ltv-textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-size: 1rem; }
.ltv-textarea { min-height: 110px; resize: vertical; }
.ltv-num { width: 90px; }
.ltv-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ltv-suggest { margin: 18px 0 0; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 16px; }
.ltv-suggest p { margin: 0 0 6px; font-size: 0.95rem; }

/* Suggestion box */
.ltv-photo-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 2px dashed var(--border); border-radius: 14px;
  background: transparent; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.ltv-photo { position: relative; margin: 10px 0 0; }
.ltv-photo img { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); }
.ltv-photo-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 0.85rem; color: var(--text-muted); }
.ltv-thanks { text-align: center; padding: 28px 16px; }
.ltv-thanks .ltv-tick { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: rgba(16, 185, 129, 0.15); color: var(--success); font-size: 1.8rem; font-weight: 800; }
.ltv-privacy { margin: 10px 0 0; font-size: 0.8rem; color: var(--text-muted); }

/* Load list */
.ltv-progress { height: 8px; border-radius: 999px; background: var(--hover-bg); overflow: hidden; margin: 6px 0 4px; }
.ltv-progress > span { display: block; height: 100%; background: var(--success); width: 0; transition: width 0.2s; }
.ltv-search { position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--bg); }
.ltv-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ltv-groups { padding-bottom: 150px; }   /* the last stop scrolls clear of the bottom bar (Dan, 19 Nov) */
.ltv-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.ltv-item.ltv-done { border-color: rgba(16, 185, 129, 0.55); }
.ltv-no { flex: 0 0 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: var(--text); color: var(--bg); font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.ltv-item.ltv-coll .ltv-no { background: transparent; color: var(--text-muted); border: 2px dashed var(--border); font-size: 0.8rem; font-weight: 700; text-align: center; line-height: 1.1; padding: 4px; }
.ltv-item-main { flex: 1 1 auto; min-width: 0; }
.ltv-item-main strong { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltv-item-main small { display: block; color: var(--text-muted); font-size: 0.85rem; }
.ltv-place { display: inline-flex; max-width: 100%; white-space: nowrap; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--hover-bg);
  color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.ltv-item-main .ltv-hint { margin-top: 3px; font-size: 0.8rem; }
.ltv-ok { flex: 0 0 auto; min-width: 58px; min-height: 48px; border: 0; border-radius: 14px; background: var(--primary); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.ltv-item.ltv-done .ltv-ok { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.ltv-empty { padding: 18px; text-align: center; color: var(--text-muted); }
.ltv-foot { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(to bottom, transparent, var(--bg) 30%); }

/* Picker sheet */
.ltv-scrim { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.ltv-sheet { width: 100%; max-width: 460px; max-height: 88vh; max-height: 88dvh; overflow: auto; padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; background: var(--card); color: var(--text); box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25); }
.ltv-grab { width: 44px; height: 5px; margin: 0 auto 10px; border-radius: 999px; background: var(--border); }
.ltv-sheet-head { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }
.ltv-sheet-head .ltv-no { flex-basis: 52px; height: 52px; font-size: 1.5rem; }
.ltv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ltv-grid.ltv-g2 { grid-template-columns: repeat(2, 1fr); }
.ltv-grid.ltv-g4 { grid-template-columns: repeat(4, 1fr); }
.ltv-chip { min-height: 52px; padding: 8px; border: 2px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.ltv-chip[aria-pressed="true"] { border-color: var(--primary); background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.ltv-chip small { display: block; font-weight: 500; font-size: 0.75rem; color: var(--text-muted); }

/* Stop card */
.ltv-stop-top { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-muted); font-size: 0.88rem; font-weight: 700; }
.ltv-stop-name { margin: 4px 0 2px; font-size: 1.45rem; font-weight: 800; line-height: 1.15; }
.ltv-stop-addr { color: var(--text-muted); font-size: 0.95rem; }
.ltv-invan { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 14px; background: rgba(37, 99, 235, 0.1); color: var(--text); font-weight: 700; }
.ltv-invan b { display: inline-grid; place-items: center; min-width: 44px; height: 36px; padding: 0 8px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 1.15rem; }
.ltv-invan .ltv-sep { color: var(--text-muted); font-weight: 500; }
.ltv-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; background: rgba(245, 158, 11, 0.15); color: #b45309; }
html[data-theme="dark"] .ltv-tag { color: #fcd34d; }
.ltv-steps { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.ltv-steps button { flex: 0 0 auto; }
.ltv-note { margin: 8px 0 0; font-size: 0.85rem; color: var(--text-muted); }
.ltv-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 0.92rem; max-width: 90vw; }

/* round planned: the offer card is the button (Dan, 19 Nov) */
.ltv-offer-btn { cursor: pointer; }
.ltv-offer-btn:hover { background: var(--hover-bg); }
.ltv-offer-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ltv-chev { flex: 0 0 auto; color: var(--text-muted); font-size: 1.6rem; line-height: 1; }

/* the van from above (Dan, 19 Nov) */
.ltv-van { display: block; width: 210px; max-width: 64vw; margin: 4px auto 0; overflow: visible; }
.ltv-van-small { width: 150px; margin-top: 12px; }
/* in the picker the whole van fits the screen you can see (Len 2, 20 Nov: its bottom was cut off on a 390x844 phone):
   its height follows the visible height (dvh: the browser's bars taken off), 220 to 330px, width from the drawing */
.ltv-sheet .ltv-van:not(.ltv-van-small) { width: auto; max-width: 100%; height: 330px; height: clamp(220px, calc(100vh - 380px), 330px); height: clamp(220px, calc(100dvh - 380px), 330px); }
.ltv-van-cab { fill: var(--hover-bg); stroke: var(--text-muted); stroke-width: 2.5; }
.ltv-van-glass { fill: #1e293b; stroke: var(--text-muted); stroke-width: 1; }
.ltv-van-body { fill: var(--card); stroke: var(--text-muted); stroke-width: 2.5; }
.ltv-van-wheel, .ltv-van-mirror { fill: #111827; stroke: var(--text-muted); stroke-width: 1.5; }   /* dark tyres and mirrors; the outline keeps them on a dark card */
.ltv-van-handle { fill: var(--text-muted); }
.ltv-van-doorline { stroke: var(--text-muted); stroke-width: 2; }
.ltv-van-door { stroke: var(--text-muted); stroke-width: 4; stroke-linecap: round; }
.ltv-van-note { font: 600 8px system-ui, sans-serif; fill: var(--text-muted); }
.ltv-area rect { fill: var(--hover-bg); stroke: var(--border); stroke-width: 1; transition: fill 0.12s; }
.ltv-area text { font: 800 12px system-ui, sans-serif; fill: var(--text); pointer-events: none; }
.ltv-area .ltv-area-v { font-size: 10px; }
.ltv-area[role="button"] { cursor: pointer; outline: none; }
.ltv-area[role="button"]:hover rect, .ltv-area[role="button"]:focus rect { fill: rgba(37, 99, 235, 0.16); }
.ltv-area-on rect { fill: var(--primary); stroke: var(--primary); }
.ltv-area-on text { fill: #fff; }
.ltv-van-mini { flex: 0 0 auto; width: 16px; height: 25px; vertical-align: middle; }
.ltv-van-mini .ltv-van-cab, .ltv-van-mini .ltv-van-body { stroke-width: 9; }
.ltv-van-mini .ltv-van-door { stroke-width: 12; }
.ltv-van-mini .ltv-van-doorline { stroke-width: 6; }
.ltv-van-mini .ltv-van-wheel, .ltv-van-mini .ltv-van-mirror, .ltv-van-mini .ltv-van-glass { stroke-width: 3.5; }
.ltv-van-mini .ltv-van-wheel, .ltv-van-mini .ltv-van-mirror { stroke: var(--text); stroke-width: 5; }   /* thick enough to read at stop-card size, light or dark */
.ltv-van-mini .ltv-van-cab { fill: var(--card); }
/* dark mode: solid mid-grey wheels and mirrors and a blue-grey windscreen, outlines kept; the light-mode fills are
   almost the dark card's colour and read as hollow outlines (Dan, 19 Nov 2026). Light mode unchanged. */
html[data-theme="dark"] .ltv-van-wheel, html[data-theme="dark"] .ltv-van-mirror { fill: #64748b; }
html[data-theme="dark"] .ltv-van-glass { fill: #475569; }
html[data-theme="dark"] .ltv-van-mini .ltv-van-wheel, html[data-theme="dark"] .ltv-van-mini .ltv-van-mirror { stroke: var(--text-muted); }
.ltv-van-mini .ltv-area rect { stroke: none; fill: transparent; }
.ltv-van-mini .ltv-area-on rect { fill: var(--primary); }
.ltv-invan .ltv-van-mini { width: 36px; height: 57px; }   /* readable at arm's length (Dan, 19 Nov) */
.ltv-invan .ltv-van-mini .ltv-van-cab, .ltv-invan .ltv-van-mini .ltv-van-body { stroke-width: 6; }
.ltv-place-static { cursor: default; }

/* bulk loading (Dan, 19 Nov) */
.ltv-ok-all { margin: 0 0 8px; font-weight: 700; color: var(--primary); }
.ltv-bulk { display: flex; align-items: stretch; margin: 0 0 8px; border: 1px solid var(--primary); border-radius: 14px; overflow: hidden; background: var(--card); }
.ltv-bulk-go { flex: 1 1 auto; min-height: 48px; padding: 8px 12px; border: 0; background: rgba(37, 99, 235, 0.1); color: var(--primary); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.ltv-bulk-place { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 8px 12px; border: 0; border-left: 1px solid var(--primary);
  background: var(--card); color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
.ltv-foot { background: var(--bg); }

/* load list grouped by place (Dan, 19 Nov) */
.ltv-group { margin: 14px 0 0; }
.ltv-group-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.ltv-group-head .ltv-van-mini { width: 18px; height: 29px; }
.ltv-offer-ic .ltv-van-mini { width: 24px; height: 38px; }   /* the Round planned card: same van as the stop card (Dan, 20 Nov 2026) */
.ltv-group-title { flex: 1 1 auto; min-width: 0; font-size: 1.02rem; }
.ltv-group-range { color: var(--text-muted); font-weight: 600; font-size: 0.92rem; }
.ltv-group-go { flex: 0 0 auto; min-height: 40px; padding: 6px 12px; border: 1px solid var(--primary); border-radius: 12px; background: rgba(37, 99, 235, 0.1); color: var(--primary); font: inherit; font-size: 0.9rem; font-weight: 800; cursor: pointer; }
.ltv-group-done { flex: 0 0 auto; color: var(--success); font-weight: 800; font-size: 0.9rem; }

.ltv-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(16, 185, 129, 0.15); color: var(--success); font-size: 0.75rem; font-weight: 800; vertical-align: middle; }

/* Start of the day (Dan, 19 Nov 2026): the Load the van card in the Stop 1 card's place; Navigate/Skip/Done and the
   stop's details wait until the driver is past it. The Stop list link stays. */
.nav-card.ltv-start-mode > *:not(.ltv-start):not(.nc-foot) { display: none !important; }
.ltv-start { padding: 2px 0 6px; }
.ltv-start-title { margin: 2px 0 6px; font-size: 1.45rem; line-height: 1.15; font-weight: 800; }
.ltv-start-line { margin: 0 0 14px; font-size: 1rem; line-height: 1.4; color: var(--text-muted); }
.ltv-start .ltv-start-skip { margin-top: 10px; min-height: 54px; border: 2px solid var(--primary); color: var(--primary); background: transparent; font-size: 1.05rem; font-weight: 700; border-radius: 16px; }
