.plan-preferences {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.profile-field, .closure-switch {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--paper);
  background: transparent;
  font-weight: 600;
  font-size: 13px;
}
.profile-field::before, .closure-switch::before {
  content: "";
  position: absolute;
  inset: 5px 0;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  pointer-events: none;
}
.profile-field select {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 48px;
  appearance: none;
  border: 0;
  padding: 0 24px 0 32px;
  color: var(--paper);
  font-weight: 600;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-overflow: ellipsis;
}
.profile-field select option { color: var(--paper); background: var(--panel); }
.profile-field svg { position: absolute; left: 9px; width: 17px; height: 17px; color: var(--mint); }
.profile-field .option-chevron { left: auto; right: 7px; width: 13px; height: 13px; color: var(--muted); }
.closure-switch { padding: 0 9px; gap: 6px; justify-content: center; }
.closure-switch > * { position: relative; }
.closure-switch i { width: 22px; height: 13px; border-radius: 20px; background: var(--line); }
.closure-switch i::after { content: ""; position: absolute; inset: 2px auto auto 2px; width: 9px; height: 9px; border-radius: 100%; background: var(--paper); }
.closure-switch[aria-checked=true] i { background: var(--mint); }
.closure-switch[aria-checked=true] i::after { transform: translateX(9px); background: var(--ink); }
#route-delta.substantial {
  padding: 6px 9px; border-inline-start: 3px solid var(--mint);
  border-radius: 4px; background: color-mix(in srgb, var(--mint) 11%, var(--panel)); color: var(--paper); font-weight: 600;
}
#edit-cancel { min-width: 46px; min-height: 44px; margin: 0; }
body[data-route-edit] :is(#favorites-open, #theme-toggle, #swap, #drawing-dock) { display:none; }
body[data-route-edit] #start-input { color: var(--muted); }
#planner #edit-cancel[hidden] {display:none;}
@container (max-width: 285px) {
  .plan-preferences { gap: 4px; }
  .profile-field, .closure-switch { font-size: 12px; }
  .profile-field select { padding-left: 9px; }
  .profile-field > svg:not(.option-chevron) { display: none; }
}
@container (max-width: 290px) {
  .closure-prefix { display: none; }
}
