/* ---------- shell */
.boot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}
.boot .brand-mark svg {
  width: 48px;
  height: 48px;
}
.boot-error h1 {
  font-size: 26px;
}

.demo-banner {
  margin: -8px 0 16px;
  padding: 8px 14px;
  border-radius: var(--r);
  background: var(--route-soft);
  color: var(--route-ink);
  font-size: 13.5px;
  font-weight: 550;
}

.nav {
  position: fixed;
  z-index: 50;
  background: var(--paper);
}
.nav-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 650;
}
.nav-item.on {
  color: var(--ink);
}
.nav-badge {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--route);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}
.nav-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--asphalt);
  color: var(--sticker);
  font-weight: 750;
  cursor: pointer;
}

@media (max-width: 899px) {
  .nav {
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: var(--safe-b);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(34, 38, 46, 0.05);
  }
  .nav-brand,
  .nav-upgrade {
    display: none;
  }
  .nav-items {
    justify-content: space-around;
  }
  .nav-items li {
    flex: 1;
  }
  .nav-item {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 62px;
    font-size: 11.5px;
  }
  .nav-item.on::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--ink);
  }
  .nav-badge {
    position: absolute;
    top: 6px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    font-size: 10.5px;
  }
  .main {
    padding: 20px 16px calc(96px + var(--safe-b));
  }
}

@media (min-width: 900px) {
  .nav {
    top: 0;
    bottom: 0;
    left: 0;
    width: 232px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 24px 16px;
    border-right: 1px solid var(--line);
  }
  .nav-brand {
    padding: 0 10px;
  }
  .nav-items {
    flex-direction: column;
    gap: 4px;
  }
  .nav-item {
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r);
    font-size: 15.5px;
  }
  .nav-item:hover {
    background: var(--wash);
    color: var(--ink);
  }
  .nav-item.on {
    background: var(--wash);
  }
  .nav-item .nav-badge {
    margin-left: auto;
  }
  .nav-upgrade {
    margin-top: auto;
    align-self: flex-start;
    padding: 10px 16px;
  }
  .main {
    margin-left: 232px;
    padding: 32px 40px 64px;
  }
}

.view {
  max-width: 1040px;
  margin: 0 auto;
}
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.view-title h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
}
.view-title p {
  margin-top: 4px;
  font-size: 14.5px;
}
.section-title {
  font-size: 20px;
  margin: 28px 0 12px;
}

.panel {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel + .panel {
  margin-top: 14px;
}
.panel h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.panel-head h2 {
  margin: 0;
}

.alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--late-soft);
  color: #8f1d23;
  font-size: 14px;
  font-weight: 550;
}
.alert .icon {
  margin-top: 2px;
}
.unpinned .icon {
  display: inline-flex;
  vertical-align: -2px;
  margin-right: 4px;
}
.alert.info {
  background: var(--route-soft);
  color: var(--route-ink);
  margin-bottom: 14px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 40px 20px;
}
.empty h3 {
  font-size: 22px;
}
.empty p {
  max-width: 42ch;
}
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.empty-art svg {
  display: block;
  max-width: 100%;
}
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--ink-2);
}

/* ---------- finds */
.paste-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 16px;
  margin-bottom: 14px;
  background: var(--paper);
  border: 1.5px dashed #c3cad5;
  border-radius: 999px;
  color: var(--ink-3);
}
.paste-bar:focus-within {
  border-style: solid;
  border-color: var(--route);
}
.paste-bar .input {
  border: 0;
  box-shadow: none;
  padding-left: 0;
  background: transparent;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip.on {
  background: var(--asphalt);
  color: #fff;
  box-shadow: none;
}
.chip.on .source {
  color: #fff;
}
.filter-selects {
  display: flex;
  gap: 8px;
}
.filter-selects .input {
  width: auto;
  background-color: var(--paper);
}

.find-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 10px;
}
.find {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  outline: 2px solid transparent;
  transition: outline-color 0.15s ease;
}
.find.selected {
  outline-color: var(--route);
}
.find.done {
  opacity: 0.66;
}
.find-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 8px 14px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.find-thumb {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  margin: -4px 4px -4px -4px;
}
.find-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r);
  background: var(--wash);
}
.find-thumb .sticker {
  position: absolute;
  right: -8px;
  bottom: -8px;
}
.find-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.find-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.find-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.meta-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.find-addr {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.find-addr.needs {
  color: #a35b00;
  font-weight: 600;
}
.find-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}
.profit {
  font-weight: 750;
  font-size: 14px;
  color: var(--profit);
  font-variant-numeric: tabular-nums;
}
.profit.neg {
  color: var(--late);
}
.when {
  font-size: 12px;
  color: var(--ink-3);
}
.status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--wash);
  color: var(--ink-2);
}
.status-contacted {
  background: var(--route-soft);
  color: var(--route-ink);
}
.status-confirmed {
  background: #fff4c7;
  color: #7a5b00;
}
.status-picked {
  background: var(--profit-soft);
  color: var(--profit);
}
.status-passed {
  text-decoration: line-through;
}

.route-toggle {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 12px 0 4px;
  cursor: pointer;
}
.route-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.route-toggle-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 58px;
  padding: 8px 4px;
  border-radius: var(--r);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.route-toggle input:checked + .route-toggle-ui {
  background: var(--route);
  color: #fff;
  box-shadow: none;
}
.route-toggle input:focus-visible + .route-toggle-ui {
  outline: 3px solid var(--route);
  outline-offset: 2px;
}
.route-toggle.off {
  cursor: not-allowed;
  opacity: 0.4;
}

.tray {
  position: sticky;
  bottom: calc(76px + var(--safe-b));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 8px 8px 8px 20px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  font-size: 15px;
}
@media (min-width: 900px) {
  .tray {
    bottom: 20px;
    max-width: 420px;
    margin-left: auto;
  }
}

/* ---------- find form */
.paste-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--r);
  background: #fffbe8;
  border: 1.5px dashed #ecd47a;
}
.paste-wrap .input.paste {
  min-height: 60px;
  background: var(--paper);
}
.window {
  align-items: center;
}
.window-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.window-cell .input {
  min-width: 0;
  flex: 1;
}
.mini {
  font-size: 13px;
  color: var(--ink-2);
  min-width: 34px;
}
.sheet-foot .btn-ghost .icon {
  margin-left: -2px;
}

/* address field */
.addr {
  position: relative;
}
.addr-row {
  display: flex;
  gap: 6px;
}
.addr-search {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: 50px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border-radius: var(--r);
  box-shadow: var(--shadow-lift);
  max-height: 260px;
  overflow-y: auto;
}
.suggest li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--r-sm);
  font-size: 14px;
  cursor: pointer;
}
.suggest li .icon {
  margin-top: 2px;
  color: var(--ink-3);
}
.suggest li:hover,
.suggest li.active {
  background: var(--wash);
}
.suggest li.none {
  color: var(--ink-2);
  cursor: default;
}
.pin-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.pin-state.ok {
  color: var(--profit);
  font-weight: 650;
}

/* ---------- route */
.view-route {
  max-width: none;
}
.route-map {
  height: 260px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.route-right {
  margin-bottom: 14px;
}
.route-left > * + * {
  margin-top: 14px;
}
@media (min-width: 1100px) {
  .main:has(.view-route) {
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  .view-route {
    display: grid;
    grid-template-columns: minmax(380px, 480px) 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 28px;
    min-height: 100dvh;
  }
  .route-head {
    grid-column: 1;
    padding-top: 32px;
  }
  .route-left {
    grid-column: 1;
    padding-bottom: 48px;
  }
  .route-right {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }
  .route-map {
    position: sticky;
    top: 0;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    border-left: 1px solid var(--line);
  }
  /* After planning: map on top, the stops scroll underneath it. */
  .route-right.with-stops {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--line);
  }
  .route-right.with-stops .route-map {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 52dvh;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .route-stops {
    max-width: 760px;
    padding: 22px 28px 48px;
  }
  .route-stops-head {
    margin: 0 0 14px;
    font-size: 18px;
  }
  .route-stops .tl {
    scroll-margin-top: calc(52dvh + 16px);
  }
  .main:has(.view-route) .demo-banner {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 5;
    margin: 0;
    max-width: 360px;
    box-shadow: var(--shadow);
  }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .route-map {
    height: 360px;
  }
}

.setup {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.setup-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}
.field-inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.field-inline .input {
  width: auto;
}
.start-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--wash);
}
.seg {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-2);
  cursor: pointer;
}
.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.seg.on {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(34, 38, 46, 0.12);
}
.seg:has(input:focus-visible) {
  outline: 3px solid var(--route);
}

.count {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-2);
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}
.count.full {
  color: #a35b00;
}
.pick-list {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
}
.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--r);
  cursor: pointer;
}
.pick:hover {
  background: var(--wash);
}
.pick input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--route);
  flex: none;
}
.pick-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pick-title {
  font-weight: 650;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pick-sub {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.unpinned {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
}
.plan-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-btn {
  width: 100%;
}
@media (max-width: 899px) {
  .plan-cta {
    position: sticky;
    bottom: calc(72px + var(--safe-b));
    z-index: 10;
  }
  .has-result .plan-cta {
    position: static;
  }
  .plan-btn {
    box-shadow: var(--shadow-lift), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  }
}

/* result */
.result {
  scroll-margin-top: 16px;
}
.summary {
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--asphalt);
  color: #fff;
}
.summary-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.summary-label {
  font-size: 14px;
  color: #c4c9d3;
}
.summary-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.035em;
  margin-top: 4px;
}
.saved-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sticker);
  color: var(--sticker-ink);
  font-size: 13px;
  font-weight: 750;
}
.saved-badge.slower {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* fastest / own order toggle */
.mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--route-soft);
}
.mode-bar.is-custom {
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.mode-text {
  min-width: 0;
  flex: 1 1 200px;
}
.mode-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  color: var(--route-ink);
}
.mode-bar.is-custom .mode-title {
  color: var(--ink);
}
.mode-sub {
  margin-top: 2px;
  font-size: 13px;
}
.mode-bar .btn {
  flex: none;
  background: var(--paper);
}
.reorder {
  margin-bottom: 12px;
  padding: 6px;
}
.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: var(--r-sm);
  background: var(--paper);
}
.order-item + .order-item {
  border-top: 1px solid var(--line-2);
}
.order-item.dragging {
  position: relative;
  z-index: 2;
  border-top-color: transparent;
  box-shadow: var(--shadow-lift);
}
.order-list.is-dragging {
  user-select: none;
}
.order-grip {
  display: grid;
  place-items: center;
  width: 32px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-3);
  cursor: grab;
  touch-action: none;
}
.order-grip:hover {
  background: var(--wash);
  color: var(--ink);
}
.order-item.dragging .order-grip {
  cursor: grabbing;
}
.order-num {
  width: 30px;
  height: 30px;
  font-size: 14px;
  flex: none;
}
.order-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.order-title {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-sub {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-price {
  flex: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.order-arrows {
  display: flex;
  flex: none;
}
.order-arrows .icon-btn {
  width: 36px;
  height: 36px;
}
.order-arrows .icon-btn[disabled] {
  opacity: 0.3;
  cursor: default;
  background: transparent;
}
.reorder-copy {
  display: block;
  margin: 6px 8px 4px;
  font-size: 13.5px;
}
@media (max-width: 620px) {
  .mode-bar .btn {
    width: 100%;
    justify-content: center;
  }
  .order-sub {
    display: none;
  }
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}
.stat {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.07);
}
.stat dt {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #b9bfca;
}
.stat dd {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 750;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat.pos dd {
  color: #6fe0ab;
}
.stat.neg dd {
  color: #ff8d92;
}
.summary-foot {
  margin-top: 14px;
  font-size: 13px;
  color: #b9bfca;
}
.summary-foot strong {
  color: #fff;
}
.summary .alert {
  margin-top: 12px;
}
.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: #c4c9d3;
}
.progress .bar {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.progress .bar span {
  display: block;
  height: 100%;
  background: #6fe0ab;
  border-radius: 6px;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}
.result-actions .btn-dark {
  flex: 1;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 24px;
  bottom: 24px;
  border-left: 3px dotted #b8c1ce;
}
.tl {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 10px 0;
  scroll-margin: 80px;
}
.tl-mark {
  position: relative;
  z-index: 1;
  flex: none;
}
.tl-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tl-start .tl-body,
.tl-end .tl-body {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
}
.tl:not(.tl-start):not(.tl-end) .tl-body {
  padding: 14px 16px;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.tl.done .tl-body {
  opacity: 0.6;
}
.tl-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.tl-title {
  font-size: 16px;
}
.tl-price {
  font-family: var(--display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tl-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 14px;
}
.tl-addr {
  font-size: 13px;
}
.tl-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #7a5b00;
  font-weight: 600;
}
.tl-note.late {
  color: var(--late);
}
.tl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* markers (map + timeline) */
.mk {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
}
.mk-start {
  border-radius: 12px;
  background: var(--asphalt);
  color: #fff;
  transform: rotate(-4deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.mk-stop {
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff3b8 0 8%, transparent 30%), var(--sticker);
  color: var(--sticker-ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 2px 6px rgba(120, 90, 0, 0.3);
  transform: rotate(-6deg);
}
.mk-stop.done {
  background: var(--profit);
  color: #fff;
}
.mk-stop.late {
  box-shadow: 0 0 0 3px var(--late), 0 2px 6px rgba(0, 0, 0, 0.2);
}
.mk-price {
  width: auto;
  min-width: 40px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.mk-price.on {
  background: var(--sticker);
  color: var(--sticker-ink);
}

/* tiny map */
.tmap {
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  background-color: #e7ebf0;
  background-image: linear-gradient(#dde3ea 1.5px, transparent 1.5px), linear-gradient(90deg, #dde3ea 1.5px, transparent 1.5px);
  background-size: 48px 48px;
  isolation: isolate;
}
.tmap.dragging {
  cursor: grabbing;
}
.tmap-tiles,
.tmap-markers {
  position: absolute;
  inset: 0;
}
.tmap-tile {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  transform-origin: 0 0;
  pointer-events: none;
  max-width: none;
}
.tmap-tile.on {
  opacity: 1;
}
.tmap-tile.err {
  display: none;
}
.tmap-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tmap-route-casing {
  fill: none;
  stroke: #fff;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tmap-route {
  fill: none;
  stroke: var(--route);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tmap-route.dashed {
  stroke-dasharray: 2 10;
}
.tmap-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}
.tmap-marker > * {
  position: absolute;
  transform: translate(-50%, -50%);
}
.tmap-marker > .mk-stop,
.tmap-marker > .mk-start {
  transform: translate(-50%, -50%) rotate(-6deg);
}
.tmap-marker-hit {
  cursor: pointer;
}
.tmap-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tmap-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.tmap-attr {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 6px;
  font-size: 10.5px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.8);
  border-top-left-radius: 6px;
}

/* ---------- runs */
.month h2 {
  margin-bottom: 4px;
}
.month .stats {
  margin-top: 10px;
}
.month .stat {
  background: var(--wash);
}
.month .stat dt {
  color: var(--ink-2);
}
.month .stat.pos dd {
  color: var(--profit);
}
.stats-3 {
  grid-template-columns: repeat(3, 1fr);
}
.run-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.run-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.run-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 16px 8px 16px 18px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.run-name {
  font-weight: 750;
  font-size: 16px;
}
.run-when {
  font-size: 13px;
}
.run-facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.run-facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.locked {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
}
.locked-preview {
  display: grid;
  gap: 10px;
  filter: blur(2px);
  opacity: 0.55;
}
.run-card.ghost {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  background: var(--wash);
  box-shadow: none;
}
.ghost-line {
  display: block;
  height: 10px;
  border-radius: 6px;
  background: #d5dbe3;
}
.w60 {
  width: 60%;
}
.w40 {
  width: 40%;
}
.locked-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.92));
}
.locked-msg h3 {
  font-size: 20px;
}
.locked-msg p {
  max-width: 40ch;
}

/* ---------- account */
.plan-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.plan-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
}
.list {
  padding: 20px 8px 8px;
}
.list h2 {
  padding: 0 12px;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  border-radius: var(--r);
  background: none;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.list-row span:not(.icon) {
  flex: 1;
}
.list-row > .icon:last-child {
  color: var(--ink-3);
}
.list-row:hover {
  background: var(--wash);
}
.view-account .fine {
  margin-top: 20px;
}
.view-account .fine a {
  margin: 0 8px;
}

/* ---------- paywall */
.paywall {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.paywall-reason {
  padding: 12px 14px;
  border-radius: var(--r);
  background: #fff6cf;
  color: #5c4500;
  font-weight: 600;
  font-size: 14.5px;
}
.perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.perk-ic {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--wash);
  flex: none;
}
.price-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.price-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer;
}
.price-opt input {
  position: absolute;
  opacity: 0;
}
.price-opt.on {
  box-shadow: inset 0 0 0 2.5px var(--asphalt);
  background: #fffdf3;
}
.price-opt:has(input:focus-visible) {
  outline: 3px solid var(--route);
}
.price-opt-title {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-2);
}
.price-opt-price {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.price-opt-note {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--profit);
}
.paywall-sheet .sheet-foot .btn-primary {
  flex: 1;
}

/* ---------- tutorial */
.tour {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 330px;
}
.tour-art {
  display: grid;
  place-items: center;
  height: 170px;
  margin-bottom: 8px;
  border-radius: var(--r-lg);
  background: var(--wash);
}
.tour-art svg {
  width: 280px;
  max-width: 100%;
  height: 150px;
}
.tour-step {
  font-size: 13px;
  font-weight: 700;
  color: var(--route);
}
.tour h3 {
  font-size: 23px;
}
.tour-finish {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.tour-dots {
  display: flex;
  gap: 6px;
}
.tour-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}
.tour-dots span.on {
  background: var(--asphalt);
  width: 18px;
  border-radius: 4px;
}

/* ---------- import */
.import-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
}
.import-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--wash);
}

/* ---------- auth */
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
}
.auth-art {
  display: none;
}
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 20px;
}
.auth-card {
  width: min(420px, 100%);
  padding: 28px;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 6px;
}
.auth-card > .muted {
  margin-bottom: 4px;
}
.auth-form {
  margin-top: 20px;
}
.form-msg {
  color: var(--late);
  font-size: 14px;
  font-weight: 600;
  min-height: 1px;
}
.form-msg:empty {
  display: none;
}
.pw-wrap {
  position: relative;
  display: block;
}
.pw-wrap .input {
  padding-right: 64px;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.switch {
  margin-top: 18px;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-2);
}
.confirm-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.confirm-box h2 {
  font-size: 22px;
}
@media (min-width: 900px) {
  .auth {
    grid-template-columns: minmax(380px, 46%) 1fr;
  }
  .auth-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 40px;
    background: var(--asphalt);
    color: #fff;
    overflow: hidden;
  }
  .auth-map {
    position: absolute;
    inset: 0;
  }
  .auth-map svg {
    width: 100%;
    height: 100%;
  }
  .auth-art .brand,
  .auth-quote {
    position: relative;
  }
  .auth-quote {
    font-family: var(--display);
    font-size: 30px;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 16ch;
  }
  .auth-brand-mobile {
    display: none;
  }
}

/* ---------- approximate locations + seller message */
.msg-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--route-soft);
}
.msg-wrap .input {
  min-height: 60px;
}
.find-addr.approx {
  color: var(--route-ink);
  white-space: normal;
}
.approx-tag {
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--route-soft);
  color: var(--route-ink);
  font-size: 11.5px;
  font-weight: 700;
}
.mk-stop.approx {
  outline: 2.5px dashed var(--route);
  outline-offset: 2px;
}
.tl-note.approx {
  color: var(--route-ink);
  flex-wrap: wrap;
}
.tl-note.approx .linkish {
  font-size: 13px;
}
.summary .alert.info {
  margin: 12px 0 0;
}
.nav-hint {
  margin: -6px 0 14px;
}

/* ---------- estimate labels */
.approx-sign {
  font-weight: 700;
  margin-right: 2px;
  opacity: 0.75;
}
.est-chip {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d5d9e0;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: middle;
}
.summary-foot.est-note {
  margin-top: 6px;
  font-size: 12.5px;
  color: #9aa1ad;
}
.est-upsell {
  color: var(--sticker);
  font-size: 12.5px;
}
.summary-split {
  margin-top: 6px;
  font-size: 14px;
  color: #c4c9d3;
}

/* Finds header actions: import from extension + add */
.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn-import[aria-disabled='true'] {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}
.btn-import[aria-disabled='true']:hover {
  transform: none;
}
.btn-import.ready {
  --bg: var(--route-soft);
  --fg: var(--route-ink);
  box-shadow: none;
}
.btn-import .count-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--route);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  margin-left: 2px;
}
@media (max-width: 620px) {
  .view-finds .view-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .view-finds .head-actions {
    width: 100%;
    justify-content: stretch;
  }
  .view-finds .head-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* map groups: nearby finds merge into one bubble; same-spot finds fan out */
.mk-group {
  width: auto;
  height: 34px;
  gap: 7px;
  grid-auto-flow: column;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: var(--asphalt);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  /* a second card peeking out behind says "more than one" */
  box-shadow: 4px 4px 0 -1px #fff, 4px 4px 0 0.5px rgba(34, 38, 46, 0.35), 0 2px 8px rgba(0, 0, 0, 0.25);
}
.mk-count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sticker);
  color: var(--sticker-ink);
  font-size: 14px;
}
.tmap-group:hover .mk-group {
  background: #343a45;
}
.tmap-hub > span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--asphalt);
  box-shadow: 0 0 0 3px #fff, 0 1px 4px rgba(0, 0, 0, 0.3);
}
.tmap-marker > .tmap-leg {
  position: absolute;
  left: 0;
  top: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--asphalt);
  opacity: 0.55;
  transform-origin: 0 50%;
  pointer-events: none;
}

/* find search (Pro) */
.filter-selects {
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--ink-3);
}
.search-box .icon {
  position: absolute;
  left: 11px;
  pointer-events: none;
}
.search-box .input {
  width: 176px;
  padding-left: 34px;
  background-color: var(--paper);
}
.search-box.has-q .input {
  box-shadow: inset 0 0 0 1.5px var(--route);
}
.search-locked {
  position: relative;
  width: 38px;
  height: 38px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-3);
}
.search-locked .lock-badge {
  position: absolute;
  right: -3px;
  top: -3px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--sticker);
  color: var(--sticker-ink);
}
@media (max-width: 620px) {
  .filter-selects {
    width: 100%;
  }
  .search-box {
    flex: 1 0 100%;
  }
  .search-locked {
    order: 2;
  }
  .search-box .input {
    width: 100%;
  }
}
@media (max-width: 620px) {
  .find-thumb {
    width: 62px;
    height: 62px;
  }
}

/* trips to a destination: end marker and detour flags */
.mk-start.mk-end {
  background: var(--route);
}
.traffic-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 12.5px;
}
.detour-bar {
  margin: -2px 0 8px;
}
.detour-bar .hint {
  margin-top: 4px;
}
.detour-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 650;
  color: #8a5a00;
}
.detour-tag.on {
  color: var(--profit);
}
.detour-tag.far {
  color: var(--late);
}
.pick.detour-far {
  background: rgba(217, 54, 62, 0.06);
}
.pick.detour-far:hover {
  background: rgba(217, 54, 62, 0.1);
}
.pick.detour-far:not(.on) .pick-title,
.pick.detour-far:not(.on) .sticker {
  opacity: 0.6;
}
.mk-price.detour-far {
  box-shadow: 0 0 0 2px var(--late), 0 1px 4px rgba(0, 0, 0, 0.2);
  opacity: 0.75;
}
.mk-price.detour-far.on {
  opacity: 1;
}
.mk-price.detour-on:not(.on) {
  box-shadow: 0 0 0 2px var(--profit), 0 1px 4px rgba(0, 0, 0, 0.2);
}
.seg span {
  white-space: nowrap;
}
@media (max-width: 420px) {
  .seg {
    gap: 4px;
    padding: 7px 9px;
  }
  .seg svg {
    width: 14px;
    height: 14px;
  }
}

/* Finds: nudge toward the extension */
.ext-promo {
  display: flex;
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--sticker);
}
.ext-promo-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--sticker);
  color: var(--sticker-ink);
}
.ext-promo-body {
  min-width: 0;
  flex: 1;
}
.ext-promo-title {
  margin: 0 0 4px;
  font-size: 17px;
}
.ext-promo-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
  max-width: 68ch;
}
.ext-promo-compare {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 13.5px;
}
.ext-promo-compare li {
  padding-left: 20px;
  position: relative;
}
.ext-promo-compare li::before {
  position: absolute;
  left: 0;
  font-weight: 800;
}
.ext-promo-compare .by-hand {
  color: var(--ink-2);
}
.ext-promo-compare .by-hand::before {
  content: '✕';
  color: var(--ink-3);
}
.ext-promo-compare .with-ext::before {
  content: '✓';
  color: var(--profit);
}
.ext-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
/* Chrome extensions don't run on phones and tablets. */
@media (pointer: coarse), (max-width: 699px) {
  .ext-promo {
    display: none;
  }
}
