/* ════════════════════════════════════════════════════════════════════════
   logi.css — АКТ II «Логістика»: вікно поруч із .desk-window у #desk.
   Карта-схема (canvas) на все поле, поверх — панелі-плитки (заливка + тінь,
   без рамок). Значення — лише з tokens.css (відтінки — color-mix від токенів).
   ════════════════════════════════════════════════════════════════════════ */

.logi-window {
  --chrome-h: 44px;
  --tabs-h: 40px;
  --panel: color-mix(in srgb, var(--surface) 96%, transparent);
  --veh-w: 296px;
  --stops-w: 384px;
  --ch-h: 206px;
  --ch-lab: 64px;
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-window);
  background: var(--sunken);
  box-shadow: var(--sh-window), inset 0 0 0 1px var(--line);
  color: var(--ink-1);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.3;
  font-feature-settings: 'ss01', 'cv11';
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
  visibility: hidden;
  pointer-events: none;
}
.logi-window.is-on {
  visibility: visible;
  pointer-events: auto;
}
html[data-layout='compact'] .logi-window {
  --chrome-h: 40px;
  --tabs-h: 0px;
}
.logi-window.no-tr,
.logi-window.no-tr * {
  transition: none !important;
}
.logi-window .tnum {
  font-variant-numeric: tabular-nums;
}

/* ── тони ─────────────────────────────────────────────────────────────── */
.logi-window .t-crimson { --tone: var(--crimson); --tone-ink: var(--crimson-ink); }
.logi-window .t-cobalt { --tone: var(--cobalt); --tone-ink: var(--cobalt-ink); }
.logi-window .t-slate { --tone: var(--slate); --tone-ink: var(--slate-ink); }
.logi-window .t-raspberry { --tone: var(--raspberry); --tone-ink: var(--raspberry-ink); }
.logi-window .t-copper { --tone: var(--copper); --tone-ink: var(--copper-ink); }
.logi-window .t-petrol { --tone: var(--petrol); --tone-ink: var(--petrol-ink); }
.logi-window .t-emerald { --tone: var(--emerald); --tone-ink: var(--emerald-ink); }
.logi-window .t-indigo { --tone: var(--indigo); --tone-ink: var(--indigo-ink); }
.logi-window .t-neutral { --tone: var(--ink-4); --tone-ink: var(--ink-2); }

.lg-i {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lg-dim {
  color: var(--ink-4);
}
.lg-sp {
  flex: 1 1 auto;
}

/* ── хром 44 + вкладки 40 (метрики .desk-window) ──────────────────────── */
.lg-chrome {
  flex: none;
  height: var(--chrome-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 16px;
  background: var(--sunken);
  box-shadow: inset 0 -1px 0 var(--line);
}
.lg-chrome-l,
.lg-chrome-c,
.lg-chrome-r {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lg-chrome-r {
  justify-content: flex-end;
}
.lg-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.lg-home b {
  font-weight: 650;
}
.lg-home .lg-i {
  color: var(--cobalt-ink);
}
.lg-period,
.lg-mapseg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--r-md);
  background: var(--fill-1);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 560;
  white-space: nowrap;
}
.lg-period .lg-i {
  width: 13px;
  height: 13px;
}
.lg-mapseg {
  background: color-mix(in srgb, var(--cobalt) 22%, var(--sunken));
  color: var(--cobalt-ink);
}
.lg-cveh {
  display: none;
}
.lg-mchip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  background: var(--fill-1);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}
.lg-mchip.is-cur {
  background: color-mix(in srgb, var(--cobalt) 28%, var(--sunken));
  color: var(--cobalt-ink);
}
.lg-inbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--fill-1);
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 560;
}
.lg-inbox b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--fill-3);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}
.lg-inbox.is-hot {
  background: color-mix(in srgb, var(--crimson) 28%, var(--sunken));
  color: var(--crimson-ink);
}
.lg-inbox.is-hot b {
  background: var(--crimson);
  color: var(--ink-1);
}
.lg-tabs {
  flex: none;
  height: var(--tabs-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  background: var(--frame);
  box-shadow: inset 0 -1px 0 var(--line);
}
.lg-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-md);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 540;
}
.lg-tab.is-active {
  background: color-mix(in srgb, var(--cobalt) 28%, var(--frame));
  color: var(--cobalt-ink);
}
.lg-tabs-r {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-right: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
}
html[data-layout='compact'] .lg-tabs,
html[data-layout='compact'] .lg-chrome-c,
html[data-layout='compact'] .lg-home,
html[data-layout='compact'] .lg-period,
html[data-layout='compact'] .lg-mapseg {
  display: none;
}
html[data-layout='compact'] .lg-chrome {
  grid-template-columns: 1fr auto;
  padding: 0 10px 0 12px;
}
html[data-layout='compact'] .lg-cveh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}
.lg-cveh b {
  font-size: 13.5px;
  font-weight: 700;
}
.lg-cveh span {
  color: var(--ink-3);
  font-size: 12.5px;
}

/* ── сцена: карта на все поле ─────────────────────────────────────────── */
.lg-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas);
}
.lg-map {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
}
.lg-ov {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--map-w, 100%);
  height: var(--map-h, 100%);
  overflow: hidden;
  pointer-events: none;
}
.lg-fx {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

/* ── краплі зупинок ───────────────────────────────────────────────────── */
.lg-drop {
  --dt: var(--cobalt);
  position: relative;
  display: inline-block;
  flex: none;
  width: 16px;
  height: 20px;
}
.lg-drop.k-unload {
  --dt: var(--emerald);
}
.lg-drop svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.lg-drop path {
  fill: var(--dt);
  stroke: color-mix(in srgb, var(--ink-1) 22%, transparent);
  stroke-width: 1;
}
.lg-drop b {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 75%;
  display: grid;
  place-items: center;
  color: var(--ink-1);
  font-size: 9.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lg-chk {
  position: absolute;
  right: -5px;
  top: -4px;
  width: 11px;
  height: 11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--dt);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity var(--t) var(--ease-out), transform var(--t-slow) var(--ease-back);
}
.lg-chk .lg-i {
  width: 8px;
  height: 8px;
  stroke-width: 3.4;
}
.is-done > .lg-drop .lg-chk,
.lg-pin.is-done .lg-chk {
  opacity: 1;
  transform: none;
}
.lg-pin {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
}
.lg-pin.is-on {
  visibility: visible;
}
.lg-pin-in {
  position: absolute;
  left: -11px;
  top: -28px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}
.lg-pin .lg-drop {
  width: 22px;
  height: 28px;
}
.lg-pin .lg-drop b {
  font-size: 11.5px;
}
html[data-layout='compact'] .lg-pin-in {
  left: -9px;
  top: -23px;
}
html[data-layout='compact'] .lg-pin .lg-drop {
  width: 18px;
  height: 23px;
}
html[data-layout='compact'] .lg-pin .lg-drop b {
  font-size: 10px;
}

.lg-pulse {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
}
.lg-pulse.is-on {
  visibility: visible;
}
.lg-pulse::before,
.lg-pulse::after {
  content: '';
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--raspberry-ink);
  opacity: 0;
}
.lg-pulse.is-on::before,
.lg-pulse.is-on::after {
  animation: lg-pulse 2.4s var(--ease-out) infinite;
}
.lg-pulse.is-on::after {
  animation-delay: 1.2s;
}
@keyframes lg-pulse {
  0% { opacity: 0.9; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ── авто героя ───────────────────────────────────────────────────────── */
.lg-car {
  position: absolute;
  left: 0;
  top: 0;
}
.lg-car-dot {
  position: absolute;
  left: -13px;
  top: -13px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cobalt);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 30%, transparent), 0 4px 14px rgba(0, 0, 0, 0.55);
}
.lg-car-ar {
  width: 15px;
  height: 15px;
  fill: var(--ink-1);
}
.lg-car-lbl {
  position: absolute;
  left: 0;
  top: 17px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  white-space: nowrap;
}
.lg-car-lbl b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-1);
}
.lg-car-sp {
  display: none;
  color: var(--cobalt-ink);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lg-car.has-sp .lg-car-sp {
  display: inline;
}

/* ── контролі карти (декор) ───────────────────────────────────────────── */
.lg-mapctl {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}
.lg-mc-g {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--sh-sm);
}
.lg-mc-g i {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}
html[data-layout='compact'] .lg-mapctl {
  display: none;
}

/* ── плитки-панелі ────────────────────────────────────────────────────── */
.lg-veh,
.lg-stops,
.lg-note,
.lg-chart {
  position: absolute;
  z-index: 4;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: var(--sh-pop);
}

/* ── ліва панель авто ─────────────────────────────────────────────────── */
.lg-veh {
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: var(--veh-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html[data-layout='compact'] .lg-veh {
  display: none;
}
.lg-vh {
  flex: none;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
}
.lg-vh b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lg-vh > span:not(.lg-sp) {
  color: var(--ink-2);
  font-size: 13px;
}
.lg-tacho {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px 8px 14px;
}
.lg-tnav {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cobalt) 28%, var(--surface));
  color: var(--cobalt-ink);
}
.lg-tnav .lg-i {
  width: 12px;
  height: 12px;
}
.lg-tc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
}
.lg-tc .lg-i {
  width: 13px;
  height: 13px;
}
.lg-tc b {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.lg-tc:first-of-type {
  background: color-mix(in srgb, var(--cobalt) 18%, var(--surface));
}
.lg-tc:first-of-type b,
.lg-tc:first-of-type .lg-i {
  color: var(--cobalt-ink);
}
.lg-seg3 {
  flex: none;
  display: flex;
  gap: 4px;
  margin: 0 12px;
  padding: 3px;
  border-radius: var(--r-md);
  background: var(--fill-1);
}
.lg-seg3 span {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 560;
}
.lg-seg3 .is-cur {
  background: color-mix(in srgb, var(--indigo) 26%, var(--fill-1));
  color: var(--indigo-ink);
}
.lg-month {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
}
.lg-month b {
  font-weight: 600;
}
.lg-sec {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  margin: 0 14px 6px;
  color: var(--cobalt-ink);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 -1px 0 var(--line);
}
.lg-sec .lg-i {
  width: 13px;
  height: 13px;
}
.lg-cards {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 10px 8px;
  overflow: hidden;
}
.lg-card {
  position: relative;
  flex: none;
  padding: 10px 10px 8px;
  border-radius: var(--r-xl);
  background: var(--raised);
  box-shadow: var(--sh-sm);
}
.lg-card::after,
.lg-chip::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 22px var(--accent-glow);
  opacity: 0;
  transition: opacity var(--t-scene) var(--ease-out);
  pointer-events: none;
}
.lg-card.is-lit::after,
.lg-chip.is-lit::after {
  opacity: 1;
  transition-duration: var(--t-slow);
}
.lg-card header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
}
.lg-code {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 24px;
  height: 20px;
  padding: 0 4px;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--tone) 28%, var(--surface));
  color: var(--tone-ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lg-cn {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 640;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lg-amt {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}
.lg-sig {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--indigo) 22%, var(--raised));
  color: var(--indigo-ink);
}
.lg-meta {
  margin: 3px 0 6px 32px;
  color: var(--ink-3);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lg-cr {
  display: none;
}
.lg-cr.is-on {
  display: inline;
}
.lg-meta .lg-cr {
  color: var(--ink-2);
}
.lg-cs {
  display: flex;
  gap: 10px;
  padding: 4px 0 4px 4px;
}
.lg-cs > .lg-drop {
  margin-top: 1px;
}
.lg-cs-t {
  min-width: 0;
  flex: 1 1 auto;
}
.lg-cs-t p {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  font-size: 11.5px;
  color: var(--ink-3);
}
.lg-cs-t p span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.lg-cs-t p:first-child {
  gap: 0;
}
.lg-cs-t p b {
  color: var(--ink-2);
  font-weight: 600;
}
.lg-cs-t p + p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-1);
}
.lg-flag {
  flex: none;
  width: 14px;
  height: 10px;
  border-radius: 2px;
}
.lg-vfoot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 12px 0 14px;
  box-shadow: inset 0 1px 0 var(--line);
}
.lg-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--indigo) 26%, var(--surface));
  color: var(--indigo-ink);
  font-size: 12.5px;
  font-weight: 600;
}

/* ── «озброєна» кнопка (мова акту I) ──────────────────────────────────── */
.lg-armed {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 30px;
  max-width: 100%;
  min-width: 0;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.lg-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  min-width: 0;
  max-width: 100%;
  padding: 0 11px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--tone) 28%, var(--surface));
  color: var(--tone-ink);
  font-size: 12.5px;
  font-weight: 620;
  white-space: nowrap;
  transition: background var(--t) var(--ease-out), color var(--t) var(--ease-out), opacity var(--t) var(--ease-out);
}
.lg-face .lg-i {
  width: 13px;
  height: 13px;
}
.lg-bl {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lg-gloss {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.lg-gloss::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--ink-1) 17%, transparent) 50%, transparent 70%);
  transform: translateX(-130%);
}
.lg-face::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--r-md) + 3px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 16px var(--accent-glow);
  opacity: 0;
  pointer-events: none;
}
.lg-armed.is-armed {
  cursor: pointer;
}
.lg-armed.is-armed .lg-face::before {
  opacity: 0.6;
  animation: lg-halo 2.4s var(--ease-io) infinite;
}
.lg-armed.is-armed .lg-gloss::after {
  animation: lg-sheen 3s var(--ease-io) infinite 0.6s;
}
.lg-armed.is-armed:hover .lg-face {
  background: color-mix(in srgb, var(--tone) 40%, var(--surface));
  color: var(--ink-1);
}
.lg-armed.is-armed:active .lg-face {
  transform: scale(0.97);
}
.lg-armed:not(.is-armed) .lg-face {
  opacity: 0.5;
}
@keyframes lg-halo {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.035); }
}
@keyframes lg-sheen {
  0%, 52% { transform: translateX(-130%); }
  86%, 100% { transform: translateX(130%); }
}
html[data-layout='compact'] .lg-armed {
  height: 38px;
}
html[data-layout='compact'] .lg-face {
  height: 32px;
  padding: 0 13px;
}

/* ── панель «Зупинки» ─────────────────────────────────────────────────── */
.lg-stops {
  left: calc(12px + var(--veh-w) + 8px);
  top: 12px;
  width: var(--stops-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lg-sh {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 8px 0 14px;
  box-shadow: inset 0 -1px 0 var(--line);
}
.lg-sh > b {
  font-size: 14.5px;
  font-weight: 650;
}
.lg-sh > .lg-i {
  color: var(--ink-3);
}
.lg-n {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 560;
}
.lg-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 2px;
  border-radius: var(--r-lg);
  background: var(--fill-1);
}
.lg-so {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-md);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 560;
}
.lg-so.is-cur {
  background: var(--fill-3);
  color: var(--ink-1);
}
.lg-so-calc {
  padding: 0;
  height: 30px;
}
.lg-so-calc .lg-face {
  height: 28px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 560;
}
.lg-so-calc:not(.is-armed) .lg-face {
  opacity: 1;
}
.lg-so-calc.is-cur .lg-face {
  background: var(--fill-3);
  color: var(--ink-1);
}
.lg-so-calc.is-armed .lg-face {
  background: color-mix(in srgb, var(--indigo) 28%, var(--fill-1));
  color: var(--indigo-ink);
}
.lg-chips {
  display: none;
}
.lg-sbody {
  position: relative;
  flex: none;
  height: 212px;
  display: grid;
}
.lg-list,
.lg-calc {
  grid-area: 1 / 1;
  min-width: 0;
  transition: opacity var(--t-slow) var(--ease-out);
}
.lg-stops[data-view='plan'] .lg-calc,
.lg-stops[data-view='calc'] .lg-list {
  opacity: 0;
  visibility: hidden;
}
.lg-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px 16px 26px minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 9px;
  height: 44px;
  padding: 0 12px 0 10px;
  background: var(--panel);
  touch-action: none;
}
.lg-row + .lg-row {
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--line) 70%, transparent);
}
.lg-row--ap {
  height: 36px;
}
.lg-row.is-pending .lg-t,
.lg-row.is-pending .lg-pill {
  opacity: 0;
}
.lg-row.is-drag,
.lg-row.is-lift {
  z-index: 5;
  background: var(--raised);
  box-shadow: var(--sh-pop);
  border-radius: var(--r-md);
}
.lg-row.is-make-room {
  transition: transform var(--t-slow) var(--ease-out);
}
.lg-row[data-stop='s3'] .lg-lift {
  cursor: grab;
}
.lg-t {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  color: var(--ink-1);
}
.lg-t small {
  color: var(--ink-4);
  font-size: 10px;
  font-weight: 560;
}
.lg-t b {
  font-size: 13px;
  font-weight: 600;
}
.lg-t.is-ok b {
  color: var(--emerald-ink);
}
.lg-t.is-copper b {
  color: var(--copper-ink);
}
.lg-t.is-crimson b {
  color: var(--crimson-ink);
}
.lg-ap {
  grid-column: 2 / 3;
  color: var(--cobalt);
}
.lg-ap .lg-i {
  width: 16px;
  height: 16px;
}
.lg-row--ap .lg-addr {
  grid-column: 3 / 5;
  font-weight: 600;
}
.lg-eye {
  grid-column: 6;
  color: var(--ink-4);
}
.lg-addr {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-1);
  font-size: 13px;
}
.lg-pill:empty {
  display: none;
}
.lg-st,
.lg-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--tone) 28%, var(--surface));
  color: var(--tone-ink);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lg-lift {
  height: 30px;
}
.lg-lift .lg-face {
  padding: 0 7px;
  gap: 2px;
}
.lg-row .lg-drop .lg-chk,
.lg-cs .lg-drop .lg-chk {
  right: -4px;
  top: -3px;
  width: 9px;
  height: 9px;
}
.lg-row .lg-drop .lg-chk .lg-i,
.lg-cs .lg-drop .lg-chk .lg-i {
  width: 7px;
  height: 7px;
}
/* прорахунок */
.lg-calc {
  display: flex;
  flex-direction: column;
  padding: 8px 14px 0;
}
.lg-cl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--line) 70%, transparent);
  font-size: 13px;
}
.lg-cl span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
}
.lg-cl b {
  font-weight: 620;
}
.lg-big {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
}
.lg-big-l {
  margin-right: auto;
  color: var(--ink-3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lg-big b {
  font-size: 40px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
}
.lg-big > span:last-child {
  color: var(--ink-3);
  font-size: 15px;
}
/* підсумок */
.lg-sfoot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 10px 0 12px;
  box-shadow: inset 0 1px 0 var(--line);
  white-space: nowrap;
  transition: background var(--t-scene) var(--ease-out);
}
.lg-fadd {
  color: var(--ink-3);
}
.lg-fd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-3);
}
.lg-fd b,
.lg-fk b,
.lg-f-eur {
  color: var(--ink-1);
  font-size: 15px;
  font-weight: 650;
}
.lg-fk {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.lg-fk small {
  color: var(--ink-3);
  font-size: 11px;
}
.lg-saved {
  position: absolute;
  left: 0;
  top: -13px;
  color: var(--emerald-ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
  opacity: 0;
}
.lg-saved.is-on {
  opacity: 1;
}
.lg-rate {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  height: 30px;
  padding: 6px 10px 0;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--tone) 26%, var(--surface));
  color: var(--tone-ink);
  transition: background var(--t-slow) var(--ease-out), color var(--t-slow) var(--ease-out);
}
.lg-rate.t-neutral {
  background: var(--fill-2);
  color: var(--ink-1);
}
.lg-rate b {
  font-size: 15px;
  font-weight: 700;
}
.lg-rate small {
  font-size: 11px;
  opacity: 0.8;
}
.lg-sfoot.is-arrived {
  background: color-mix(in srgb, var(--emerald) 12%, transparent);
}
.lg-sfoot.is-arrived .lg-rate {
  box-shadow: 0 0 18px color-mix(in srgb, var(--emerald) 40%, transparent);
}

/* ── сповіщення «Нове злеценя» ────────────────────────────────────────── */
.lg-note {
  top: 12px;
  right: 60px;
  width: 300px;
  padding: 12px 12px 10px 14px;
  background: var(--raised);
  box-shadow: var(--sh-sheet);
  transform-origin: 0 0;
  visibility: hidden;
  z-index: 8;
}
.lg-note.is-on {
  visibility: visible;
}
.lg-nh {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--crimson-ink);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lg-nh span {
  margin-left: auto;
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: none;
  letter-spacing: 0;
}
.lg-nb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}
.lg-nt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.lg-nt b,
.lg-na {
  font-size: 15px;
  font-weight: 680;
}
.lg-nr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
}
.lg-nr .lg-i {
  color: var(--ink-3);
}
.lg-nr i {
  color: var(--ink-4);
  font-style: normal;
}
.lg-nf {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ── кнопка «Графік водія» ───────────────────────────────────────────── */
.lg-mapchart {
  display: none;
}
html[data-layout='compact'] .logi-window.arm-chart .lg-mapchart {
  display: inline-flex;
  position: absolute;
  z-index: 6;
  right: 10px;
  top: calc(var(--map-h) - 48px);
}
html[data-layout='compact'] .lg-mapchart .lg-face {
  border-radius: var(--r-pill);
  box-shadow: var(--sh-pop);
  background: color-mix(in srgb, var(--indigo) 36%, var(--surface));
}
html[data-layout='compact'] .lg-mapchart .lg-face::before {
  border-radius: var(--r-pill);
}

/* ── графік водія ─────────────────────────────────────────────────────── */
.lg-chart {
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: var(--ch-h);
  z-index: 7;
  display: flex;
  flex-direction: column;
  padding: 0 12px 10px;
  background: var(--surface);
  box-shadow: var(--sh-sheet);
  visibility: hidden;
  transform: translateY(110%);
}
.lg-chart.is-on {
  visibility: visible;
  transform: none;
}
.lg-chh {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  white-space: nowrap;
}
.lg-chh > b {
  font-size: 13.5px;
  font-weight: 650;
}
.lg-dim2 {
  color: var(--ink-3);
  font-size: 12.5px;
}
.lg-chseg {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  background: var(--fill-2);
  font-size: 12px;
  font-weight: 600;
}
.lg-tks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg-tk-l {
  color: var(--ink-4);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lg-tk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-sm);
  background: var(--fill-1);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 620;
}
.lg-tk .lg-i {
  width: 12px;
  height: 12px;
  color: var(--slate-ink);
}
.lg-tk b {
  display: inline-block;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: var(--r-xs);
  background: var(--fill-3);
  color: var(--ink-1);
  font-size: 10.5px;
}
.lg-go {
  display: none;
}
.logi-window.arm-go .lg-go {
  display: inline-flex;
}
.lg-chg {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.lg-scale,
.lg-day {
  display: grid;
  grid-template-columns: var(--ch-lab) minmax(0, 1fr);
}
.lg-scale {
  height: 16px;
}
.lg-hours {
  position: relative;
}
.lg-hours span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 10px;
}
.lg-hours span:first-child {
  transform: none;
}
.lg-day {
  height: 54px;
}
.lg-day[data-day='d2'] {
  height: 82px;
}
.lg-dl {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 21px;
  line-height: 1.15;
}
.lg-dl b {
  font-size: 12.5px;
  font-weight: 650;
}
.lg-dl small {
  color: var(--ink-4);
  font-size: 10px;
}
.lg-track {
  position: relative;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--line) 80%, transparent) 1px, transparent 1px);
  background-size: calc(100% / 24) 100%;
}
.lg-drops {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 20px;
  z-index: 3;
}
.lg-chd {
  position: absolute;
  top: 1px;
  margin-left: -7px;
  display: flex;
  align-items: flex-start;
}
.lg-chd .lg-drop {
  width: 14px;
  height: 18px;
}
.lg-chd .lg-drop b {
  font-size: 8.5px;
}
.lg-chd .lg-tag {
  position: absolute;
  right: 18px;
  top: 0;
  height: 17px;
  padding: 0 6px;
  font-size: 10.5px;
}
.lg-chd.is-late .lg-drop {
  --dt: var(--crimson);
}
.lg-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  height: 26px;
  overflow: hidden;
  border-radius: var(--r-xs);
}
.lg-plan,
.lg-fmask,
.lg-fin {
  position: absolute;
  inset: 0;
}
.lg-fmask {
  overflow: hidden;
  z-index: 2;
}
.lg-bk {
  --bk: var(--slate);
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  transform-origin: 0 50%;
  font-style: normal;
  overflow: hidden;
}
.lg-bk.k-drive { --bk: var(--crimson); }
.lg-bk.k-break { --bk: var(--emerald); }
.lg-bk.k-work { --bk: var(--copper); }
.lg-bk.k-rest { --bk: var(--slate); }
.lg-plan .lg-bk {
  background: color-mix(in srgb, var(--bk) 22%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bk) 55%, transparent);
  background-clip: padding-box;
  border: 1px dashed color-mix(in srgb, var(--bk) 75%, transparent);
  box-shadow: none;
}
.lg-fin .lg-bk {
  background: color-mix(in srgb, var(--bk) 62%, var(--surface));
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--surface) 60%, transparent);
}
.lg-fin .lg-bk.k-rest {
  background: color-mix(in srgb, var(--bk) 42%, var(--surface));
}
.lg-bk span {
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lg-plan .lg-bk span {
  color: color-mix(in srgb, var(--ink-1) 85%, var(--bk));
}
.lg-bk.is-late {
  --bk: var(--crimson);
  background: color-mix(in srgb, var(--crimson) 45%, var(--surface)) !important;
  border-style: solid !important;
  border-color: var(--crimson-ink) !important;
}
.lg-tiles {
  position: absolute;
  left: 0;
  right: 0;
  top: 16px;
  height: 34px;
  z-index: 5;
  pointer-events: none;
}
.lg-choice {
  position: absolute;
  top: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px;
  pointer-events: auto;
}
.lg-choice::before {
  content: '';
  position: absolute;
  inset: 0 6px;
  border-radius: var(--r-lg);
  background: var(--raised);
  box-shadow: var(--sh-pop);
}
.lg-ch-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--r-md);
  background: var(--fill-3);
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 620;
}
.lg-ch-opt .lg-i,
.lg-ch-9 .lg-i {
  width: 12px;
  height: 12px;
}
.lg-ch-9 {
  position: relative;
}
.lg-wins {
  position: absolute;
  left: 0;
  right: 0;
  top: 52px;
  height: 18px;
}
.lg-win {
  --wt: var(--cobalt);
  position: absolute;
  height: 2px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--wt) 70%, transparent);
}
.lg-win.k-unload {
  --wt: var(--emerald);
}
.lg-win b {
  position: absolute;
  left: calc(100% + 4px);
  top: -4px;
  color: var(--wt);
  font-size: 8.5px;
  font-weight: 750;
  line-height: 1;
}
.lg-win.is-late {
  --wt: var(--crimson-ink);
}
.lg-wend {
  position: absolute;
  top: -32px;
  height: 46px;
  width: 0;
  border-left: 1px dashed color-mix(in srgb, var(--ink-3) 60%, transparent);
}
.lg-wend b {
  position: absolute;
  left: 4px;
  bottom: -14px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 620;
  white-space: nowrap;
}
.lg-wend.is-late {
  border-color: var(--crimson-ink);
}
.lg-wend.is-late b {
  color: var(--crimson-ink);
}
.lg-wend.is-ok {
  border-color: color-mix(in srgb, var(--emerald-ink) 70%, transparent);
}
.lg-wend.is-ok b {
  color: var(--emerald-ink);
}
.lg-now {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 4px;
  width: 0;
  z-index: 4;
  border-left: 2px solid var(--cobalt);
  margin-left: -1px;
  visibility: hidden;
}
.lg-now.is-on {
  visibility: visible;
}
.lg-now b {
  position: absolute;
  top: -12px;
  left: -21px;
  width: 40px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--cobalt);
  color: var(--ink-1);
  font-size: 10px;
  font-weight: 700;
}

/* ── привиди ──────────────────────────────────────────────────────────── */
.lg-ghost {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  max-width: 280px;
  padding: 0 12px 0 8px;
  border-radius: var(--r-md);
  background: var(--overlay);
  box-shadow: var(--sh-pop), 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--ink-1);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  will-change: transform, opacity;
}
.lg-ghost span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ════════════════════════════ телефон 372×596 ═══════════════════════════ */
html[data-layout='compact'] .logi-window {
  --ch-lab: 30px;
}
html[data-layout='compact'] .lg-stops {
  left: 0;
  right: 0;
  width: auto;
  top: var(--map-h);
  bottom: 0;
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--surface);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
}
html[data-layout='compact'] .lg-sh {
  height: 44px;
  padding: 0 6px 0 12px;
}
html[data-layout='compact'] .lg-seg {
  height: 42px;
}
html[data-layout='compact'] .lg-so {
  height: 38px;
}
html[data-layout='compact'] .lg-so-calc {
  height: 38px;
}
html[data-layout='compact'] .lg-so-calc .lg-face {
  height: 36px;
}
html[data-layout='compact'] .lg-chips {
  display: flex;
  flex: none;
  gap: 6px;
  padding: 6px 8px;
  box-shadow: inset 0 -1px 0 var(--line);
}
.lg-chip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: 16px 14px;
  column-gap: 6px;
  align-items: center;
  padding: 5px 8px;
  border-radius: var(--r-lg);
  background: var(--raised);
}
.lg-chip .lg-code {
  grid-row: 1 / 3;
}
.lg-chip > b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 640;
}
.lg-chip .lg-amt {
  font-size: 12px;
}
.lg-chip .lg-cr {
  grid-column: 2 / 4;
  color: var(--ink-3);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lg-chip .lg-cr:not(.is-on) {
  display: block;
  visibility: hidden;
}
html[data-layout='compact'] .lg-sbody {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
html[data-layout='compact'] .lg-row {
  height: 38px;
  grid-template-columns: 34px 16px 24px minmax(0, 1fr) auto auto;
  column-gap: 7px;
  padding: 0 8px 0 6px;
}
html[data-layout='compact'] .lg-row--ap {
  height: 30px;
}
html[data-layout='compact'] .lg-addr {
  font-size: 12px;
}
html[data-layout='compact'] .lg-lift {
  height: 38px;
}
html[data-layout='compact'] .lg-lift .lg-face {
  height: 36px;
  padding: 0 9px;
}
html[data-layout='compact'] .lg-calc {
  padding: 2px 12px 0;
}
html[data-layout='compact'] .lg-cl {
  height: 26px;
  font-size: 12.5px;
}
html[data-layout='compact'] .lg-big {
  padding-top: 4px;
}
html[data-layout='compact'] .lg-big b {
  font-size: 30px;
}
html[data-layout='compact'] .lg-sfoot {
  height: 44px;
  gap: 9px;
  padding: 0 8px 0 10px;
}
html[data-layout='compact'] .lg-fadd {
  display: none;
}
html[data-layout='compact'] .lg-fd b,
html[data-layout='compact'] .lg-fk b,
html[data-layout='compact'] .lg-f-eur,
html[data-layout='compact'] .lg-rate b {
  font-size: 13.5px;
}
html[data-layout='compact'] .lg-rate {
  height: 28px;
  padding: 6px 9px 0;
}
html[data-layout='compact'] .lg-note {
  top: 8px;
  left: 8px;
  right: 8px;
  width: auto;
  padding: 10px 10px 8px 12px;
}
html[data-layout='compact'] .lg-nf {
  margin-top: 4px;
}
html[data-layout='compact'] .lg-chart {
  left: 0;
  right: 0;
  top: var(--map-h);
  bottom: 44px;
  height: auto;
  border-radius: var(--r-card) var(--r-card) 0 0;
  padding: 0 8px 6px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45), inset 0 -1px 0 var(--line);
}
html[data-layout='compact'] .lg-chh {
  height: 44px;
  gap: 8px;
}
html[data-layout='compact'] .lg-chh .lg-dim2,
html[data-layout='compact'] .lg-chseg,
html[data-layout='compact'] .lg-tk-l,
html[data-layout='compact'] .lg-tk-10 {
  display: none;
}
html[data-layout='compact'] .lg-chh > b {
  font-size: 13px;
}
html[data-layout='compact'] .lg-tks {
  gap: 3px;
}
html[data-layout='compact'] .lg-tk {
  padding: 0 5px;
  height: 20px;
  font-size: 10.5px;
}
html[data-layout='compact'] .lg-tk b {
  padding: 0 3px;
}
html[data-layout='compact'] .lg-hours span.is-minor {
  display: none;
}
html[data-layout='compact'] .lg-day {
  height: 74px;
}
html[data-layout='compact'] .lg-day[data-day='d2'] {
  height: 100px;
}
html[data-layout='compact'] .lg-scale {
  height: 22px;
}
html[data-layout='compact'] .has-chart .lg-saved {
  display: none;
}
html[data-layout='compact'] .lg-band {
  height: 30px;
}
html[data-layout='compact'] .lg-tiles {
  top: 16px;
  height: 38px;
}
html[data-layout='compact'] .lg-choice {
  height: 38px;
  justify-content: flex-end;
}
html[data-layout='compact'] .lg-wins {
  top: 58px;
}
html[data-layout='compact'] .lg-dl b {
  font-size: 11.5px;
}
html[data-layout='compact'] .lg-dl small {
  display: none;
}
html[data-layout='compact'] .lg-bk span {
  font-size: 9.5px;
}
html[data-layout='compact'] .lg-choice {
  left: auto !important;
  right: -2px;
  width: auto !important;
}
