:root {
    --ink: #1d2b38; --muted: #526577; --line: #d3dce5; --page: #edf3f7;
    --green: #2f5d8a; --green-hover: #254a70; --green-10: #e4eef8; --paper: #fff;
}
body { background: #e3eaf0; }
.mobile-frame { max-width: 560px; min-height: 100dvh; margin: 0 auto; background: var(--page); }
.customer-map-pane { position: relative; height: clamp(234px, 43dvh, 420px); }
.customer-map { width: 100%; height: 100%; }
.customer-map-tools { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.customer-map-tools :is(button, .mobile-brand) { background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 6px #263a501e; }
.customer-map-tools button { pointer-events: auto; }
.map-tool { width: 42px; height: 42px; border-radius: 7px; color: var(--ink); font-size: 1.14rem; }
#customer-map-center { margin-left: auto; }
.mobile-brand { color: var(--ink); padding: 9px 12px; border-radius: 7px; font-size: 1.05rem; }
.map-context { position: absolute; bottom: 13px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #ffffffed; border: 1px solid var(--line); color: var(--muted); padding: 5px 9px; border-radius: 5px; font-size: .85rem; pointer-events: none; }
.customer-sheet { position: relative; margin-top: -3px; padding: 15px 14px calc(19px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 12px; }
.sheet-title h1 { font-size: 1.28rem; }
.sheet-title h2 { font-size: 1.16rem; }
.lookup-form, .mobile-form { display: grid; gap: 10px; }
.lookup-form label, .mobile-form label { font-size: .94rem; }
.lookup-form input, .mobile-form input { font-size: 16px; min-height: 43px; }
.customer-actions { display: flex; gap: 7px; margin-top: 3px; }
.customer-actions .button { flex: 1 1 auto; min-height: 44px; }
.order-title { align-items: start; flex-wrap: wrap; }
.order-title p { color: var(--muted); margin-top: 4px; font-size: .86rem; }
.mobile-info { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 12px; line-height: 1.5; margin: 9px 0; }
.mobile-info dt { color: var(--muted); }
.mobile-info dd { margin: 0; overflow-wrap: anywhere; }
.route-info { padding: 8px; background: #f1f5f9; border-left: 3px solid #8daaca; border-radius: 4px; }
.progress-heading, .mobile-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.progress-heading { margin-top: 13px; }
.progress-heading h2, .mobile-card-heading h2 { font-size: 1.08rem; }
.mobile-timeline { list-style: none; padding: 0; margin: 10px 0 12px; }
.mobile-timeline li { position: relative; min-height: 32px; display: flex; justify-content: space-between; gap: 8px; margin-left: 4px; padding: 1px 0 7px 13px; border-left: 1px solid var(--line); }
.mobile-timeline li::before { position: absolute; content: ''; width: 8px; height: 8px; top: 4px; left: -4px; background: #6f98bb; border-radius: 50%; }
.mobile-timeline li:last-child { min-height: 22px; border-color: transparent; }
.mobile-timeline time { color: var(--muted); font-size: .84rem; white-space: nowrap; }

.mobile-sheet-dialog { width: min(100%,560px); max-width: none; max-height: 78dvh; margin: auto auto 0; padding: 13px 14px calc(14px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 12px 12px 0 0; color: var(--ink); background: #fff; }
.mobile-sheet-dialog::backdrop { background: #16273568; }
.mobile-sheet-dialog .sheet-title { margin-bottom: 7px; }
.sheet-menu-item { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 7px 8px; border: 0; border-top: 1px solid var(--line); background: white; color: var(--ink); text-decoration: none; }
.sheet-menu-item:hover { background: var(--page); }
.guide-steps { margin: 5px 0; padding-left: 20px; }
.guide-steps li { margin-bottom: 10px; line-height: 1.55; }
.guide-steps p { margin-top: 3px; color: var(--muted); }

.car-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.car-topbar { min-height: 48px; padding: 5px 10px; display: flex; align-items: center; gap: 8px; background: #243b51; color: #fff; }
.car-topbar > strong { white-space: nowrap; }
.car-top-status { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: .86rem; flex-wrap: wrap; justify-content: end; }
#duty-status { background: #455c72; border-radius: 4px; padding: 4px 6px; white-space: nowrap; }
#duty-status.online { background: #d5e9f6; color: #254867; }
.car-menu-button { background: #385872; color: white; border: 1px solid #607e97; border-radius: 4px; min-height: 33px; min-width: 35px; }
.mobile-login { margin: 23px 12px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.mobile-login h1 { font-size: 1.47rem; margin-bottom: 13px; }
#car-work { flex: 1; display: flex; flex-direction: column; }
.car-hero { padding: 8px 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 3px 10px; background: #dfeaf3; border-bottom: 1px solid var(--line); }
.car-hero h1 { font-size: 1.05rem; }
.location-line { color: var(--muted); font-size: .86rem; }
.location-line.error-text { padding: 3px 5px; border-radius: 4px; }
.car-stage { flex: 1; padding: 8px; }
.car-panel { border: 1px solid var(--line); border-radius: 5px; padding: 9px; background: white; }
.mobile-card-heading { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.mobile-card-heading h2 span { font-size: .85rem; color: var(--muted); }
.car-controls { position: sticky; bottom: 0; display: grid; grid-template-columns: minmax(0,2fr) repeat(2,minmax(0,1fr)); gap: 5px; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: #e2ebf3; border-top: 1px solid var(--line); }
.car-controls .button { min-height: 44px; padding-inline: 5px; border-radius: 5px; }
.car-controls [aria-pressed="true"] { color: var(--green); border-color: #7598b8; background: var(--green-10); }
.job { border: 1px solid var(--line); border-radius: 6px; margin-top: 7px; padding: 8px; background: #f6f9fc; }
.job header { display: flex; gap: 6px; justify-content: space-between; align-items: center; }
.job h3 { font-size: 1.04rem; }
.job .button { min-height: 39px; padding-inline: 9px; }
.job .link-button { margin-top: 8px; }
.job .mobile-info { font-size: .92rem; }
.job .button-group { gap: 5px; }
.mobile-map { height: clamp(240px, 58dvh, 520px); border-radius: 5px; }
.car-map-panel .mobile-map { margin-top: 6px; }
.finish-map { height: 220px; margin-top: 8px; }
#clear-finish-point { margin-top: 5px; }
